[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Editing random component
>
> I'm using IC 4.8.5. I am trying to change /templates/components/random
> to NOT display the 'Buy Now' button if the quantity in the inventory
> database is < 1 for the item. I changed the following code.
>
> <td nowrap align="center">
> [if-loop-data inventory quantity <1]
> [else]
> [if-loop-data options o_modular]
> [page [loop-code]]
> [else]
> [order [loop-code]]
> [/else]
> [/if-loop-data]
> <img align="top" src="__THEME_IMG_DIR__buynow.gif" border="0"
> alt="Buy Now">[/order]
> [/else]
> [/if-loop-field]
> </td>
>
>
> But when it executes it display the "[if-loop-data inventory quantity
> <1][else]" code on the page instead of interpreting it. I have use
> [if-item-data inventory quantity <1] on the results page and it worked
> fine. Can someone tell me what I am doing wrong?
>
For a start, change this line:
[if-loop-data inventory quantity <1]
to this:
[if-loop-data inventory quantity < 1]
Once you've done that, close the [if-loop-data] with an [/if-loop-data],
rather than a [/if-loop-field].
Other problems will become apparent once those have been fixed.
--
_/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
_/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h
_/ _/ _/ _/ _/ _/ _/ _/_/ kevin@cursor.biz
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/