Rockstar2 Posted June 17, 2010 Share Posted June 17, 2010 In the tab that usually says "More Info" I'd like to put text there from a CMS article such as - delievery times and shipping policy. This can be for every product or selected few. How can I do this? Link to comment Share on other sites More sharing options...
Rockstar2 Posted June 17, 2010 Author Share Posted June 17, 2010 anyone can I help? Link to comment Share on other sites More sharing options...
Rockstar2 Posted June 20, 2010 Author Share Posted June 20, 2010 no one knows how? Link to comment Share on other sites More sharing options...
rocky Posted June 20, 2010 Share Posted June 20, 2010 Add the following code to product.php before the $smarty->display: $cms = new CMS(1, intval($cookie->id_lang)); $smarty->assign('cms', $cms); This will get the content of CMS page 1 in the currently selected language. Change 1 to whatever page you want to be displayed on the product page. Then add the following code in product.tpl in the "More info" section: {$cms->content} Link to comment Share on other sites More sharing options...
Rockstar2 Posted June 20, 2010 Author Share Posted June 20, 2010 Add the following code to product.php before the $smarty->display: $cms = new CMS(1, intval($cookie->id_lang)); $smarty->assign('cms', $cms); This will get the content of CMS page 1 in the currently selected language. Change 1 to whatever page you want to be displayed on the product page. Then add the following code in product.tpl in the "More info" section: {$cms->content} Ok, thanks. But for the 2nd part where exactly do I put the - {$cms->content} in the coding? Seems to break the tab positions up if I try to put them in the coding... Link to comment Share on other sites More sharing options...
rocky Posted June 20, 2010 Share Posted June 20, 2010 Try putting it before or after {$product->description} on line 340 of product.tpl (in PrestaShop v1.3.1): {$product->description} Link to comment Share on other sites More sharing options...
Rockstar2 Posted June 20, 2010 Author Share Posted June 20, 2010 Try putting it before or after {$product->description} on line 340 of product.tpl (in PrestaShop v1.3.1): {$product->description} Thanks that seemed to work but what if I didnt enter a description through the back office? I would like the More Info tab to show with the CMS article regardless. Only seems to show if you entered some text for product description. Thanks! Link to comment Share on other sites More sharing options...
mohsart Posted June 20, 2010 Share Posted June 20, 2010 Try putting it before or after {$product->description} on line 340 of product.tpl (in PrestaShop v1.3.1): {$product->description} Thanks that seemed to work but what if I didnt enter a description through the back office? I would like the More Info tab to show with the CMS article regardless. Only seems to show if you entered some text for product description. Thanks! Remove {if $product->description} Or maybe add something like "OR $cms->content".../Mats Link to comment Share on other sites More sharing options...
mohsart Posted June 20, 2010 Share Posted June 20, 2010 My last post was a little short, maybe, so I'll ellaborate...Try changing {if $product->description} <!-- full description --> {$product->description} {/if} to <!-- full description --> {$product->description} {$cms->content} or {if $product->description} <!-- full description --> {$product->description} {/if} {$cms->content} or even {if product->description OR $cms->content} {if $product->description} <!-- full description --> {$product->description} {/if} {if $cms->content} {$cms->content} {/if} {/if} Not sure if any of the if statements are actually needed, especially if cms is never empty. It may however be useful if you want to add text, e.g. {l s='Details:'} {$product->description} and {l s='CMS:'} {$cms->content}/Mats Link to comment Share on other sites More sharing options...
mohsart Posted June 20, 2010 Share Posted June 20, 2010 Sorry, you will need to also change/remove the if statements beneath {$HOOK_PRODUCT_FOOTER} <!-- description and features --> /Mats Link to comment Share on other sites More sharing options...
Rockstar2 Posted June 20, 2010 Author Share Posted June 20, 2010 Thanks so much!! ^ ^ Try putting it before or after {$product->description} on line 340 of product.tpl (in PrestaShop v1.3.1): {$product->description} Thanks that seemed to work but what if I didnt enter a description through the back office? I would like the More Info tab to show with the CMS article regardless. Only seems to show if you entered some text for product description. Thanks! Remove {if $product->description} Or maybe add something like "OR $cms->content".../Mats ok thanks! It shows though in the "Reviews" Tab above the "Add a review" button Link to comment Share on other sites More sharing options...
mohsart Posted June 21, 2010 Share Posted June 21, 2010 Not sure I understand...Are you happy or do you have more questions?I have a "Review" tab in my shop, but that one was created by me.Are you saying that you have one too and that the information shows up there instead of in the tab associated with the idTab1 div/tab?/Mats Link to comment Share on other sites More sharing options...
Rockstar2 Posted June 21, 2010 Author Share Posted June 21, 2010 Not sure I understand...Are you happy or do you have more questions?I have a "Review" tab in my shop, but that one was created by me.Are you saying that you have one too and that the information shows up there instead of in the tab associated with the idTab1 div/tab?/Mats Its fine now it's just that the info doesn't show up in the more info tab, but under the "review" tab. you can check the site below in my signature: Link to comment Share on other sites More sharing options...
mohsart Posted June 21, 2010 Share Posted June 21, 2010 OK, as long as you're happy...It should appear in the tab "whose" div you put the code in... i.e. if you have e.g. {if $product->description OR $cms->content}{l s='More info'} and {$product->description} {$cms->content} it should appear in the "More info" tab. The keyword here is "idTab1"/Mats Link to comment Share on other sites More sharing options...
Rockstar2 Posted July 2, 2010 Author Share Posted July 2, 2010 Ok, got it to work, thanks! Link to comment Share on other sites More sharing options...
Ronaldo Perez Posted May 15, 2011 Share Posted May 15, 2011 Hi, tell me please how to apply this idea to version 1.4.1 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