How to add variable 'Available' to orders_form.tpl?

Setita

No avatar

2009-11-10 08:17

I wish my customer during ordering product could see the things i'v add to 'Available' variable in product cart. So i'v added to orders_form.tpl :
in section
<!-- BEGIN ORDER_PRODUCTS_LIST -->
<td class="available">
$aData[sAvailable]
</td>
and in section:
<!-- BEGIN ORDER_PRODUCTS_HEAD -->
<td class="available">
$lang[Available]
</td>

the table column has been added properly but its data field is empty. Does anyone can help me?

version 3.4

&#187; Quick.Cart v3.x

» Quick.Cart v3.x

Seti

beholder

Avatar: beholder

2009-11-11 04:01

I've just done something very similar, it's not as easy as you would think:

1. You need to add the 'available' content to product's entries when adding the product to the basket with addToBasket(). That's when writing into orders_temp.php takes place and that's where you need to transfer the product's 'available' contents. You also must change db structure there, unless you do some magic with mixed fields that will imploded/exploded when written to/read from, since orders_temp doesn't normally contain the 'available' information.

2. If you change db structure, make sure it's reflected in the db/orders_temp-def.php.

3. You then need to read the 'available' content from orders_temp.php in function generateBasket() and add it to the structure the function creates.

Then you should be able to have content of the 'available' field present in order_form.tpl, in the three blocks ORDER_PRODUCTS_. If you do not understand this, it's not really my problem, this is highly qualified advice you're getting here and if you have a trouble with it, hire some programmer to implement this for you.

Back to top
about us | contact