| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
"Special Offer" Tag | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
"Special Offer" Tag
I'm trying to modify the products_list.tpl so that it will display information in a custom field.
For example, i have created a custom field called "SPECIAL_OFFER" and created a custom styled div that i would like to display the text from the custom field, like this: http://i42.tinypic.com/r88rb5.jpg The problem is i can't figure out the the right statements to: A) Show the DIV only when there is something in that field and B) Show put the contents of that field into the DIV as shown above. Many Thanks! Carl
__________________
Version 4.4.1 Gold |
|||||||
#2
|
|||||||
|
|||||||
Re: "Special Offer" Tag
Carl,
This thread has all the code you need to do this: http://forum.x-cart.com/showthread.php?t=46059 The key is to use an if to determine if the extra field has content, if so, display the div.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#3
|
|||||||
|
|||||||
Re: "Special Offer" Tag
HI carpeperdiem,
I've just been through that thread but i am still having issues getting it to display the div when i enter text into the custom field
__________________
Version 4.4.1 Gold |
|||||||
#4
|
|||||||
|
|||||||
Re: "Special Offer" Tag
What is need is:
Does field "SPECIAL_OFFER" contain anything? |-> Yes, Show: Code:
__________________
Version 4.4.1 Gold |
|||||||
#5
|
|||||||
|
|||||||
Re: "Special Offer" Tag
Carl,
Did you assign a var and get the var to appear on the page? If you can get it to the page, then constraining it to "only if it exists" is simple. What code did you use to get it to the page?
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#6
|
|||||||
|
|||||||
Re: "Special Offer" Tag
I couldn't get it to display on the page at all. I'm guessing i didnt assign the var correctly
I used the code from the one of the examples in the other thread and changed the fields etc. to match mine
__________________
Version 4.4.1 Gold |
|||||||
#7
|
|||||||
|
|||||||
Re: "Special Offer" Tag
can anybody help?
Thanks
__________________
Version 4.4.1 Gold |
|||||||
#8
|
|||||||
|
|||||||
Re: "Special Offer" Tag
Quote:
__________________
X-Cart Gold : 4.2.1 (on linux parallels plesk / mysql) Php v5.2.9 (Zend: 2.2.0) - MySql v5.0.79 - LiteSpeed server Modules : X-Offer & X-Aom & One page checkout Product tabs & Product downloads & many more |
|||||||
#9
|
|||||||
|
|||||||
Re: "Special Offer" Tag
Bump
__________________
Version 4.4.1 Gold |
|||||||
|
|||
X-Cart forums © 2001-2020
|