| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Adding Free Shipping Image | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I know that this can be done with an if statement, but I don't know how to do it. I have been trying with no luck.
I would like to place a free shipping image either next to or under the price on the product page and featured products. I am trying to get this to work if free shipping had been selected when the product is set up. Thank you for your help.
__________________
Xcart 5.1.6 Building New Store Xcart4.6.4 Gold Plus Xcart 4.6.4 Platinum Smart Template, Mail Chimp Upgrade Checkout One (One Page Checkout) Checkout One X-Payments Connector Checkout One Deluxe Tools Call For Price On Sale Module Buy Together Module MAP Price MOD |
|||||||
#2
|
|||||||
|
|||||||
![]()
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
![]() OK
On the product.tpl I put the line below and it works fine. {if $product.free_shipping eq "Y"}<img src="{$ImagesDir}/promo_free_shipping.gif">{/if}{* Added For Free Shipping Image *} On the products.tpl and products_t.tpl I tried both of the following with no luck. {if $product.free_shipping eq "Y"}<img src="{$ImagesDir}/promo_free_shipping.gif">{/if}{* Added For Free Shipping Image *} {if $products[product].free_shipping eq "Y"}<img src="{$ImagesDir}/promo_free_shipping.gif">{/if}{* Added For Free Shipping Image *} I would like the free shipping image to show up in the products page and the featured products page. Please help.
__________________
Xcart 5.1.6 Building New Store Xcart4.6.4 Gold Plus Xcart 4.6.4 Platinum Smart Template, Mail Chimp Upgrade Checkout One (One Page Checkout) Checkout One X-Payments Connector Checkout One Deluxe Tools Call For Price On Sale Module Buy Together Module MAP Price MOD |
|||||||
#4
|
|||||||
|
|||||||
![]() Help Please, I have been trying everything I can think of, but with no luck.
__________________
Xcart 5.1.6 Building New Store Xcart4.6.4 Gold Plus Xcart 4.6.4 Platinum Smart Template, Mail Chimp Upgrade Checkout One (One Page Checkout) Checkout One X-Payments Connector Checkout One Deluxe Tools Call For Price On Sale Module Buy Together Module MAP Price MOD |
|||||||
#5
|
|||||||||
|
|||||||||
![]() what if you try to use $products[prod].free_shipping instead of $products[product].free_shipping in products.tpl?
|
|||||||||
#6
|
|||||||
|
|||||||
![]() Sorry but that does not seem to work either,
__________________
Xcart 5.1.6 Building New Store Xcart4.6.4 Gold Plus Xcart 4.6.4 Platinum Smart Template, Mail Chimp Upgrade Checkout One (One Page Checkout) Checkout One X-Payments Connector Checkout One Deluxe Tools Call For Price On Sale Module Buy Together Module MAP Price MOD |
|||||||
#7
|
|||||||
|
|||||||
![]() We'll I got it to work.
This will put the free shipping image on the featured products page, products page, and the detailed product page. In the product.tpl put this code where you want the image to be: {* Free Shipping Image start *} <br /> <br /> {if $product.free_shipping eq "Y"} <img src="{$ImagesDir}/promo_free_shipping.gif" alt="Free Shipping" />{/if} {* Free Shipping Image End *} In the products_t.tpl put the following code where you would like the image. {* Free Shipping Image Mod Begin *} <br /> {if $products[product].free_shipping eq 'Y'} <img src="{$ImagesDir}/free_shipping.gif" alt="Free Shipping" /{/if} {* Free Shipping Mod End *} Must be pasted in this format, will not work if on single line.
__________________
Xcart 5.1.6 Building New Store Xcart4.6.4 Gold Plus Xcart 4.6.4 Platinum Smart Template, Mail Chimp Upgrade Checkout One (One Page Checkout) Checkout One X-Payments Connector Checkout One Deluxe Tools Call For Price On Sale Module Buy Together Module MAP Price MOD |
|||||||
#8
|
|||||||
|
|||||||
![]() That's because your code is botched up
![]() {if $products[product].free_shipping eq 'Y'}<img src="{$ImagesDir}/free_shipping.gif" alt="" />{/if} You have an open image tag and a closing span tag in your code, which is probably why it wasn't displaying correctly.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#9
|
|||||||
|
|||||||
![]() The code I used was from the post that you refered me to. I now have the mod working with the mod write listed above.
Should I use the / at the end of the image line to close it. What does the alt="" do. I have been reading like crazy, learning quite a bit.
__________________
Xcart 5.1.6 Building New Store Xcart4.6.4 Gold Plus Xcart 4.6.4 Platinum Smart Template, Mail Chimp Upgrade Checkout One (One Page Checkout) Checkout One X-Payments Connector Checkout One Deluxe Tools Call For Price On Sale Module Buy Together Module MAP Price MOD |
|||||||
#10
|
|||||||
|
|||||||
![]() No, the code in that thread was correct, you implemented it incorrectly. This is broken:
<img src="{$ImagesDir}/free_shipping.gif" /</span> To be W3C compliant, an image tag needs to be closed with the / at the end (as does any tag with no closing tag) and the alt tag is also required. ALT text is for people with disabilities, so it would also be wise to put 'Free shipping' in the alt tag.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|