Guest lprintz Posted March 5, 2012 Share Posted March 5, 2012 Hello all! I need help with what I believe is a simple PHP thing...I just can't seem to get the syntax right! Ideally I'd like the 'sale price' to show 'Call for pricing' if a product is out of stock Alternatively, I can set OOS products to $0, in which case I would need PHP to designate if the sale price is set to zero, then show 'Call for pricing' Any assistance would be MOST appreciated! Thanks so much! Len Quote Link to comment Share on other sites More sharing options...
Guest Viola Posted March 6, 2012 Share Posted March 6, 2012 In /skins/[skin_name]/templates/content.product.php look for this: <div id="price"> {if $PRODUCT.ctrl_sale} <span class="price_previous">{$PRODUCT.price}</span> <span class="price_sale">{$PRODUCT.sale_price}</span> {else} {$PRODUCT.price} {/if} </div> replace with <div id="price"> {if $PRODUCT.ctrl_sale} {if $CTRL_OUT_OF_STOCK} <p>Call for pricing</p> {else} <span class="price_previous">{$PRODUCT.price}</span> <span class="price_sale">{$PRODUCT.sale_price}</span> {/if} {else} {$PRODUCT.price} {/if} </div> Haven't tested it, but it should work in theory. Quote Link to comment Share on other sites More sharing options...
Guest lprintz Posted March 6, 2012 Share Posted March 6, 2012 Hey Viola! Thanks SO much and this worked great...HOWEVER...the OOS product isn't appearing on the site so I think we need to go the 'if product = 0' route. Could you help me out with the syntax on that? Basically, if the sale price is zero then show 'call for pricing' Len Quote Link to comment Share on other sites More sharing options...
Guest Viola Posted March 7, 2012 Share Posted March 7, 2012 the OOS product isn't appearing on the site so I think we need to go the 'if product = 0' route. Could you help me out with the syntax on that? Basically, if the sale price is zero then show 'call for pricing' That can't be done in the template - if the sale price is 0 then the item is not considered to be on sale. So that way would involve hacking up the source code. But if the item is not appearing on the site in the first place I'm not sure how that would help. Do you know why the item is not appearing? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.