![]() |
Hide Price based on Mfgr
I need to hide the price of a specific manufacturer so only the retail price shows and replace it with text like "Add to cart for price". Can someone do a quick if/then statement for me that does this??
|
Re: Hide Price based on Mfgr
{if $product.manufacturerid eq 'XXX'} SHOW TEXT {else} SHOW PRICE {/if}
fixed. |
Re: Hide Price based on Mfgr
eeq gave me a blank page, eq works, but the SHOW PRICE still shows after the else.
|
Re: Hide Price based on Mfgr
So you just copy/paste as I posted :) There is an error - double ee in eeg... It should be "eg"
|
Re: Hide Price based on Mfgr
I see that it does work, but I need to hide the price when that happens and the price looks like its in another if/else just below it (product_details.tpl)
|
Re: Hide Price based on Mfgr
You need to surround the existing code that shows price with this
{if $product.manufacturerid eq 'XXX'} SHOW TEXT {else} EXISTING CODE {/if} Also replace XXX with the actual manufacturer id and make sure this info is available in the product array - you can use the webmaster mode to inspect the product array. |
Re: Hide Price based on Mfgr
I tried this, but it doesnt display aything.. where am i going wrong??
Code:
{if $product.manufacturerid eq '2'} |
Re: Hide Price based on Mfgr
also tried it with an {/if} at the end to close it out and still got nothing.
|
Re: Hide Price based on Mfgr
got it working, thanks!!
|
Re: Hide Price based on Mfgr
good, glad you got it working
|
Re: Hide Price based on Mfgr
Now I need to make the list page work the same way. I tried products_list.tpl but nothing changed. What template shows the category lists?
|
Re: Hide Price based on Mfgr
ok, products_t.tpl is the file.
I see where the "Suggested Retail: $180.00, save 6%" text is but I cant find the price code above it. Any help? |
Re: Hide Price based on Mfgr
found it..
<span class="price-value">{currency value=$product.taxed_price}</span> |
Re: Hide Price based on Mfgr
bringing this back, is there any way to easily add more than one manufacturer to the condition?
{if $product.manufacturerid eq '2'} i need manuf. # 2 and 47. How would i add 47?? |
Re: Hide Price based on Mfgr
I tried adding
or '47' but that didnt work, it includes all mfg if I do that. |
Re: Hide Price based on Mfgr
{if $product.manufacturerid eq '2' or $product.manufacturerid eq '47'}
|
Re: Hide Price based on Mfgr
ok, i'm trying to get this to work on xcarts xmobile module skin but every time I try it, the pages come up blank or give a server error. evidently those variables aren't loaded or something in that skin. Any thoughts on how to make it work?
nevermind, I got it working.. |
All times are GMT -8. The time now is 07:05 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.