![]() |
"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 |
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. |
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 :( |
Re: "Special Offer" Tag
What is need is:
Does field "SPECIAL_OFFER" contain anything? |-> Yes, Show: Code:
<div class="special-offer-tag"> |
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? |
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 |
Re: "Special Offer" Tag
can anybody help?
Thanks |
Re: "Special Offer" Tag
Quote:
|
Re: "Special Offer" Tag
Bump :)
|
All times are GMT -8. The time now is 05:47 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.