Additional variable in basket page...

kalanta

No avatar

2009-06-03 16:38

I inserted new field in my product template and database. Call it $aData[sNewVariable]. I can see it in product detail page but i can't see this variable in my orders_basket, orders_form, admin/order and maybe in email with order details pages. How to make this new variable available in all these files? In my opinion it should be something with core/orders.php

» Quick.Cart v3.x

beholder

Avatar: beholder

2009-06-03 17:47

you have function listProducts() in the core/orders.php. When you add your variable there, you can 'see' it from templates you list.
However, this can only be done AFTER $oOrder->listProducts() is called, which is done several times in actions_client/p.php and also in core/orders.php.

Theoretically, if you want to TRANSFER the contents of your variable to your $oOrder->listProducts(), you should use _POST or perhaps do it in the actions_client/p.php, which is 'one level above' core/orders.php in the imaginary QC code hierarchy.

beholder

Avatar: beholder

2009-06-03 17:47

I still would love to see your webshop, you seem to be very able in making changes, I am really intrigued.

beholder

Avatar: beholder

2009-06-03 17:48

just out of pure curiosity, of course.

kalanta

No avatar

2009-06-03 21:29

I'm not satisfied with the answer above. I want to know where and what exactly i need to do. It's about PHP changes only.

beholder

Avatar: beholder

2009-06-03 21:45

sure, but I do not know what exactly you did and where when you 'can see it in product detail'.

kalanta

No avatar

2009-06-04 08:52

1. in xx_products.def.php I inserted 'sSecondName' => 8... this is ok
2. in admin/products.tpl I inserted additional row below product's name row with
$lang['SecondName'] and input with value="$aData[sSecondName]". It is ok.
3. In products_default.tpl I added my new variable $aData[sSecondName]. Now I can see in product detail page my additional product name or alike. But I wanna see it in my basket page too. When I add product to shopping cart, I would like to see like this:

Product Name | Second Name | Price | Quantity | Total

In order form, order print and in order details in admin I need the same. Jus one more field.

kalanta

No avatar

2009-06-15 21:48

this should be like this http://opensolution.org/Quick.Cart/forum/?p=readTopic&nr=5571, just my new variable (text) instead of the image.

any ideas?

beholder

Avatar: beholder

2010-03-15 02:24

hey Kalanta, did you solve this eventually?

kalanta

No avatar

2010-03-20 20:52

I don't remember this..

Deivids

Avatar: Deivids

2011-10-04 09:20

I need something like this one. I would love to add BARCODE to my products. So I created a new field in products.tpl, created the new varriable sbarcode in products database. Works properly. Now I can see my barcode on product detail page, but there is a problem - I can't see this barcode in shopping cart, order form and order print pages. How can I solve this problem?

Deivids

Avatar: Deivids

2011-10-04 11:42

I figured it out. Thanks for the help to Opensolution.org

Back to top
about us | contact