zvunks Posted March 7, 2016 Share Posted March 7, 2016 Hi! Is possible to modify the code for product description module? Or, where i can find the code that renders the description... so i can include some php function an parse expressions? (not the short description) Thank you. Link to comment Share on other sites More sharing options...
Denver Prophit Jr. Posted March 7, 2016 Share Posted March 7, 2016 You should be using smarty to parse variables. Link to comment Share on other sites More sharing options...
zvunks Posted March 8, 2016 Author Share Posted March 8, 2016 Hi, thanks for your answers! I have something like folder,interval,alt,exclusions and generate html... and N appearences of this... it's not a simple variable parsing. I have to try to make a new module and use some product.tpl hook for my custom parsing the description. Link to comment Share on other sites More sharing options...
zvunks Posted March 9, 2016 Author Share Posted March 9, 2016 Hi, i want to parse one or more command like this: [code=fotorama]<folder>,<interval>,<alt>,<other params>[/code] and generate html for fotorama, using some php functions i have. Then, in header, i need to include JS library for fotorama. So in description i will have one or more photo gallery. (Sorry, only now i see that forum has modified my previous example of code i want to parse) Thanks! Link to comment Share on other sites More sharing options...
zvunks Posted March 11, 2016 Author Share Posted March 11, 2016 Hi, i solved this... I overrided Product class (added a new function where i included other php files), and ProductController controller (for adding JS and CSS). Then, in Product.tpl i used $product->myNewFunction($product->description) instead of $product->description. Thanks to a friend of mine that works in prestashop more often... Thanks for messages... topic solved Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now