| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Removing Options on 0 Dollar Items... | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hello,
On our customer front-end, under the price of a detailed product description there are options, quantity and then the Add to Cart button. We have it setup so that if an item has a "0" price it says "Call for pricing". If a product has a "0" price we don't want that options line, quantity and Add to Cart button to show up. I know this is in the product.tpl file, but I can't figure out the {if} statements nor where to put them. Any help would be greatly appreciated! Thank you
__________________
X-Cart Gold 4.4.0 |
|||||||
#2
|
|||||||
|
|||||||
![]() In skin1/customer/main/product.tpl
FIRST FIND: <table width="100%" cellpadding="0" cellspacing="0"> <tr><td colspan="2"> <b><font class="ProductDetailsTitle">{$lng.lbl_options}</font></b> REPLACE WITH: <table width="100%" cellpadding="0" cellspacing="0"> {*****1a-ADDED TO REMOVE PRICE FROM $0 PRODUCTS*****} {if $product.taxed_price ne 0} {****1a-END ADDED TO REMOVE PRICE FROM $0 PRODUCTS***} <tr><td colspan="2"> <b><font class="ProductDetailsTitle">{$lng.lbl_options}</font></b> SECOND FIND: {include file="customer/main/product_prices.tpl"} {if $config.General.unlimited_products eq "Y" or ($product.avail gt 0 and $product.avail ge $product.min_amount)} {if $js_enabled} <br /> REPLACE WITH: {include file="customer/main/product_prices.tpl"} {if $config.General.unlimited_products eq "Y" or ($product.avail gt 0 and $product.avail ge $product.min_amount)} {if $js_enabled} <br /> {****1b-ADDED TO REMOVE PRICE FOR $0 PRODUCT*******} {/if} {****1b-END ADDED TO REMOVE PRICE FOR $0 PRODUCT***} THIRD FIND: {if $product.forsale ne "B"} <table cellspacing="0" cellpadding="0"> <tr> <td>{include file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"}</td> <td> &nbs p;</td> REPLACE WITH: {if $product.forsale ne "B"} <table cellspacing="0" cellpadding="0"> <tr> {****2a-ADDED TO REMOVE PRICE FOR $0 PRODUCT*******} {if $product.forsale ne "B"||$product.taxed_price ne 0} {****2a-END ADDED TO REMOVE PRICE FOR $0 PRODUCT***} <td>{include file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"}</td> <td> &nbs p;</td> {****2b-ADDED TO REMOVE PRICE FOR $0 PRODUCT*******} {/if} {****2b-END ADDED TO REMOVE PRICE FOR $0 PRODUCT***} This works on my test site which doesn't contain any mods. I didn't test it on my live site. If you have a heavily modded products.tpl, you may run into snags.
__________________
toomnyhats X-Cart Gold 4.1.9 (Unix) X-SpecialOffers DSEFU (disabled) |
|||||||
#3
|
|||||||
|
|||||||
![]() Thanks toomy, I got it working!
__________________
X-Cart Gold 4.4.0 |
|||||||
#4
|
|||||||
|
|||||||
![]() No problem!
__________________
toomnyhats X-Cart Gold 4.1.9 (Unix) X-SpecialOffers DSEFU (disabled) |
|||||||
#5
|
|||||||
|
|||||||
![]() I know this reply to this thread is a month out of date, but the info was very helpful, with one exception.
The three part mod did a great job removing the add to cart button on zero (0) priced items, but on those with a price, it added a "&nbs p;" visually after the add to cart button for those products with a price. So now it looks a bit funky with the button and then those letters (I know it is html for a space, but not sure why it's showing up all of a sudden.) Any thoughts? Thanks for current and future assistance. Tim
__________________
x-cart gold Version 4.1.8 |
|||||||
#6
|
|||||||
|
|||||||
![]() CollectiveInk,
Find this line of code: Code:
It should look like this: - MoonDog -
__________________
X-CART Gold v4.1.8 |
|||||||
#7
|
|||||||
|
|||||||
![]() That did it! Thanks.
![]() ![]() Crazy how one little space can make a huge difference how things appear. ![]()
__________________
x-cart gold Version 4.1.8 |
|||||||
|
|||
X-Cart forums © 2001-2020
|