Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 VP-ASP 7.0 Questions
 customization on tmp_product.htm form
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

baukeplugge
Starting Member

Netherlands
8 Posts

Posted - November 06 2014 :  16:06:58  Show Profile  Reply with Quote
Hi All,

I have done some customizations on the product template tmp_product.htm.
I have added some radio button selections.
now I want to show these extra selections in the shopping cart.

is this possible ? if so how should I do this ?

thanks in advantage
Bauke

carfin
VP-CART Expert

United Kingdom
948 Posts

Posted - November 07 2014 :  07:50:01  Show Profile  Reply with Quote
Hi Bauke,

the best way to add your selections to the cart is to have the radio button choices as features of the product. This can be set up easily in the admin panel and there is no custom code required to add to the cart

Regards,
Carrol
www.deanston-electrical.co.uk
Go to Top of Page

baukeplugge
Starting Member

Netherlands
8 Posts

Posted - November 07 2014 :  08:26:13  Show Profile  Reply with Quote
hi thanks for you reply!

I have used the other fields 1 till 5 for saving extra product info.
so I really want to have that information in the cart if possible.
thanks again !
Bauke
Go to Top of Page

serjtankian
VP-CART Super User

Armenia
378 Posts

Posted - November 12 2014 :  04:53:25  Show Profile  Visit serjtankian's Homepage  Reply with Quote
Hi Bauke,

I think you you can refer to VP ASP manual chapter 4.16.9. Product Features to learn more about product feature.

you can download from here : http://www.vpasp.com/virtprog/VPASP_700_User_Manual.zip








*serj*
Go to Top of Page

manilow
VP-CART New User

France
134 Posts

Posted - November 13 2014 :  03:14:00  Show Profile  Visit manilow's Homepage  Reply with Quote
Hi Bauke,

To display the extra fields in your cart, go to your shopping cart configuration to set:

xcartfields = cname,cdescription,ccode,pother3,pother4,pother5

(or any combination)

Kind regards,

Erik
www.aquathermia.com
Go to Top of Page

baukeplugge
Starting Member

Netherlands
8 Posts

Posted - November 13 2014 :  09:30:31  Show Profile  Reply with Quote
Hi Carrol,

thank you very much for your reply!
only this will put the options availble in that product but not the selection done in the product before adding to the cart
Go to Top of Page

manilow
VP-CART New User

France
134 Posts

Posted - November 13 2014 :  10:07:24  Show Profile  Visit manilow's Homepage  Reply with Quote
If you want options to be selectable, then use the Product Options module : shopa_editdisplayprodfeatures.asp

Kind regards,

Erik
www.aquathermia.com
Go to Top of Page

baukeplugge
Starting Member

Netherlands
8 Posts

Posted - November 13 2014 :  17:41:15  Show Profile  Reply with Quote
I have already created my own selection options from other database tables. that''s working as a charm. but now I need to get those selections into my cart.

it would be good to be able to.
Go to Top of Page

baukeplugge
Starting Member

Netherlands
8 Posts

Posted - November 17 2014 :  07:32:05  Show Profile  Reply with Quote
Do I need to write this to a session cookie ? is there someting written about this ?
Go to Top of Page

carfin
VP-CART Expert

United Kingdom
948 Posts

Posted - November 17 2014 :  09:11:12  Show Profile  Reply with Quote
You would have to create custom code in the files shopaddtocart.asp and shopcartformat.asp so that the text details of your option will display on each product on the cart page.

A screen shot of your template would be helpful as I''m not 100% sure of what you are trying to achieve. Product templates only display data from the products table.

Regards,

Carrol
www.deanston-electrical.co.uk

Edited by - carfin on November 17 2014 09:14:34
Go to Top of Page

baukeplugge
Starting Member

Netherlands
8 Posts

Posted - November 17 2014 :  10:18:52  Show Profile  Reply with Quote
I have this in my tmp_product.htm added:

[ADD_SIZES]

then I have added this in shopfileio.asp

case "ADD_SIZES"
Add_Sizes "User",parsearray
rc=0

sub Add_Sizes (ivalue, parsearray)
dim sizes, fieldname,fieldtype, rc, sizearray, x
fieldname="pother2"
FindInDatabase fieldname, sizes, fieldtype ,rc,parsearray
WriteForm "Maten: "
sizearray=split(sizes,",")
for each x in sizearray
WriteForm "<input name=""test"" type=""radio"" value=""" & x & """/>" & x
next
end sub

in pother2 I have added data from an external table with sizes for this product.
for each size there will be a radio selection button.

now I want to get this into the cart so I know what size is selected

Go to Top of Page

baukeplugge
Starting Member

Netherlands
8 Posts

Posted - November 24 2014 :  09:05:38  Show Profile  Reply with Quote
anybody who could help ??
Go to Top of Page

manilow
VP-CART New User

France
134 Posts

Posted - November 24 2014 :  09:51:50  Show Profile  Visit manilow's Homepage  Reply with Quote
Hi Bauke,

Ok, there must be a way I guess.

One would be to modify the GetNameInCart subroutine in shopproductsubs.asp:

Insert the following lines in red:


for i = 0 to fieldcount -1
if cartfields(i) = "cdescription" then
fieldvalue = memCDescription
fieldvalue = TranslateLanguage(dbc, "products", "cdescription", "CatalogId", tempCatalogId, fieldvalue)

elseif cartfields(i) = "pother2" then
fieldvalue = request.Form("test_option")


else
fieldvalue = rsitem(cartfields(i))
if lcase(cartfields(i)) = "cname" then



"test_option" is the name of your radio button input in the product template.

Set xcartfields = cname,cdescription,ccode,pother2
(include at least cname and pother2)

When adding a product to the shopping cart, normally it will get all informations from the database (cname, cprice, etc). With the modification above, it will get the selected feature value from the product form instead.

This code may need some optimization since in case a customer adds two identical products into the cart with different feature options, only the first selected will remain.

I hope this will help you further.

Kind regards (met vriendelijke groet)

Erik
www.aquathermia.com
Go to Top of Page

baukeplugge
Starting Member

Netherlands
8 Posts

Posted - January 16 2015 :  17:08:29  Show Profile  Reply with Quote
Hi Erik,

thanks for your help.

did not had the change till now to test this part. and it did what I wanted !!

thanks very much.

Bauke
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00