Jump to content

[SOLVED] trying to add an additional tab on the product page to show a CMS page


Recommended Posts

Hi, I'm using the Fennecs theme by 2link in a project of a t-shirts store, and I'm trying to add an additional tab on the product page in order to show a CMS page of "size guiding", or if it's possible to add the link to that CMS page just below the short description or the size selector drop-list... I'm using PS 1.3.7.0 and the website is http://www.franelas.co/pv/

Any help? I'm really newbie with PS and low knowledge of css/php... thanks in advance.

Greetings from Colombia!

Link to comment
Share on other sites

HI Diego
You could try to do a smarty include where you have the text "size guide",

try this

<?php
$cms = new CMS(1, intval($cookie->id_lang));
if (Validate::isLoadedObject($cms))
  $smarty->assign('content', $cms->content);
?>



and change the 1 for the correct CMS page id

Not sure if that is going to work but no harm trying it, if not just copy the size guide text into your new tab area.

Link to comment
Share on other sites

Ok finally i got it!!

i putted the code you gave me in the end of product.php file like this:

$cms = new CMS(6, intval($cookie->id_lang));
if (Validate::isLoadedObject($cms))
 {
  $smarty->assign('cmscontent', $cms->content);
  $smarty->assign('cmsname', $cms->meta_title);
 }





then i putted the smarty tags of cms title and content in the product.tpl file:



Then i checked if the page loads ok with the changes and voila!! check the attach image to see result...

40526_mmNI9MbledR5y1AVUl7r_t


{l s='Product'}
       {if isset($accessories) AND $accessories}{l s='complete your Look'}{/if}
       {if $product->description}{l s='More infos'}{/if}
{$cmsname}
       {$HOOK_PRODUCT_TAB}
        


       {$cmscontent}

 
Link to comment
Share on other sites

  • 4 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...