X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Remove "Edit Options" from Cart for Particular Product (https://forum.x-cart.com/showthread.php?t=38458)

1day2004 03-19-2008 05:41 PM

Remove "Edit Options" from Cart for Particular Product
 
I want to remove the "Edit Options" button for one of the products.

I believe the code I need to change is the following (from cart.tpl):

Code:

{if $products[product].product_options ne ''}
{if $config.UA.platform eq 'MacPPC' && $config.UA.browser eq 'MSIE'}
{include file="buttons/edit_product_options.tpl" href="javascript:window.open('`$catalogs.customer`/popup_poptions.php?target=cart&id=`$products[product].cartid`','POptions','width=550,height=350,toolbar=no,status=no,scrollbars=yes,resizable=no,menubar=no,location=no,direction=no');" js_to_href="Y"}
{else}
{include file="buttons/edit_product_options.tpl" href="javascript:window.open('`$catalogs.customer`/popup_poptions.php?target=cart&id=`$products[product].cartid`','POptions','width=550,height=350,toolbar=no,status=no,scrollbars=yes,resizable=no,menubar=no,location=no,direction=no');"}
{/if}
{/if}


How can I insert an if statement so that the button won't show for Product 123?

Thanks

1day2004 03-19-2008 06:30 PM

Re: Remove "Edit Options" from Cart for Particular Product
 
Ok, I figured it out. Here it is in case anyone else needs it:

Code:

{if $products[product].product_options ne '' and $products[product].productid ne "123"}
{if $config.UA.platform eq 'MacPPC' && $config.UA.browser eq 'MSIE'}
{include file="buttons/edit_product_options.tpl" href="javascript:window.open('`$catalogs.customer`/popup_poptions.php?target=cart&id=`$products[product].cartid`','POptions','width=550,height=350,toolbar=no,status=no,scrollbars=yes,resizable=no,menubar=no,location=no,direction=no');" js_to_href="Y"}
{else}
{include file="buttons/edit_product_options.tpl" href="javascript:window.open('`$catalogs.customer`/popup_poptions.php?target=cart&id=`$products[product].cartid`','POptions','width=550,height=350,toolbar=no,status=no,scrollbars=yes,resizable=no,menubar=no,location=no,direction=no');"}
{/if}
{/if}



All times are GMT -8. The time now is 03:04 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.