Jump to content

if $product.id


mihai666g

Recommended Posts

Hi,

 

I want to do some customization on configureproduct.tpl based on the product id that the client is trying to order.

 

I think the code should be something like this:

 

{if $product.id eq "123"}

good

{/if}

 

...but is not working.

 

Any idea how can I make this to work ?

Link to comment
Share on other sites

try $product.pid - but if all else fails, add {debug} to your template code and it will popup a window showing the Smarty variables/arrays available.

 

Thanks.

 

{debug} option helped me to find the right syntax, witch is:

 

{if $productinfo.pid eq "123"}

good

{/if}

Link to comment
Share on other sites

  • 6 years later...
On 2/8/2015 at 4:38 PM, brian! said:

try $product.pid - but if all else fails, add {debug} to your template code and it will popup a window showing the Smarty variables/arrays available.

How can i use on multiple products? Will it work:

{if $productinfo.pid eq "1,2,3"}

good

{/if}

Thanks!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated