VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 Customization
 Extra Fields in Oitems
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Steve2507
VP-ASP Expert

590 Posts

Posted - October 20 2010 :  14:46:47  Show Profile  Reply with Quote
Hi Guys,

Does anyone have an easy to follow method of getting extra product fields into the oitems table as seperate fields?

I know how to do it as additions to the product description, but these need to be completely seperate fields.

Thanks in advance.


Steve
Sex toys from a UK sex shop including vibrators and dildos.

carfin
VP-ASP Expert

United Kingdom
948 Posts

Posted - October 21 2010 :  08:55:27  Show Profile  Reply with Quote
Hi Steve,
First create your new field in the oitems table eg "extra"
Then open shop$db.asp
At the start, add a new Cart attribute eg const cExtraInfo=22 (you may need to change the attribute number according to your own set up)
Then find Sub ShopAddOrder and add
rsitem("extra") = arrcart(cExtraInfo,i)

Then open shopproductfeatures.asp
Find Sub CartAddItem(id, rc) and add
arrCart(cExtraInfo,scartItem) = strpother1 (or whatever field you are using in the products table)

That should be all you need unless you want the customer to see the field in the cart in which case you would pull the info from the attribute and create a header and cart field accordingly

Hope this helps,
Regards,

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

Steve2507
VP-ASP Expert

590 Posts

Posted - October 21 2010 :  10:57:59  Show Profile  Reply with Quote
Hi Carrol,

Thanks for that.

It didn't quite work with your code, but it started me on the right line.

I used the code you mentioned and then also in shop$db declared 2 new common variables and in Sub ProductGetValues(objRs, dbc) entered strextra = objrs("extra").

Works great.

Thanks for the help.


Steve
Sex toys from a UK sex shop including vibrators and dildos.
Go to Top of Page

Steve2507
VP-ASP Expert

590 Posts

Posted - October 21 2010 :  12:00:45  Show Profile  Reply with Quote
Quick update.

If anyone is trying to do something similar to this be careful.

Unfortunately implementing this has brought the server to its knees. No idea why, but it's back to the drawing board.


Steve
Sex toys from a UK sex shop including vibrators and dildos.
Go to Top of Page

carfin
VP-ASP Expert

United Kingdom
948 Posts

Posted - October 22 2010 :  04:29:29  Show Profile  Reply with Quote
Steve,

what errors were you getting originally with the info I gave you?

There isn't a need to declare extra variables in shop$db.asp except the attributes for the cart. The way I did it only uses the cart array to store an extra attribute which is populated with data from an existing field in the products table when the product is added to the cart and is then passed through with the order and inserted into the oitems table at checkout. Could your extra fields in the oitems table be the cause? I know in the past you've had trouble with additional fields and SQL.

I'm still running the code on our local intranet test site and there are no problems.

Regards,

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

Steve2507
VP-ASP Expert

590 Posts

Posted - October 22 2010 :  05:23:32  Show Profile  Reply with Quote
Hi Carrol,

There were no error messages received it just made the server resources go through the roof. But without the new variable being declared an error message was coming up saying that the variable hadn't been declared.

I'm going to have another go today.


Steve
Sex toys from a UK sex shop including vibrators and dildos.
Go to Top of Page

Steve2507
VP-ASP Expert

590 Posts

Posted - October 22 2010 :  05:40:15  Show Profile  Reply with Quote
Hi,

Now getting a Subscript out of range error, even though the cMaxCartAttributes has been increased.


Steve
Sex toys from a UK sex shop including vibrators and dildos.
Go to Top of Page

carfin
VP-ASP Expert

United Kingdom
948 Posts

Posted - October 22 2010 :  05:48:43  Show Profile  Reply with Quote
Steve, this is what our Cart attributes are set up as:

const cMaxCartAttributes=24
Const cProductid = 1
Const cProductCode = 2
Const cProductname = 3......
......
const cProductMiniName=21
const cExtraInfo=22
const cuploadimagerequired=25 '**** redundant
const cgraphicname1=23
const ccountgraphics=24


We will never use the image upload so I made it redundant

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

Steve2507
VP-ASP Expert

590 Posts

Posted - October 25 2010 :  08:07:13  Show Profile  Reply with Quote
Hi Carrol,

Ours are similar to yours except we have 27 constants.

Can't get it to work though. It should be very easy, but.....

I'll drop a line toSimon and see if they can help.


Steve
Sex toys from a UK sex shop including vibrators and dildos.
Go to Top of Page

Steve2507
VP-ASP Expert

590 Posts

Posted - October 30 2010 :  08:57:12  Show Profile  Reply with Quote
Had this solved with help from Simon at BYZ, thanks Simon for the help.


Steve
Sex toys from a UK sex shop including vibrators and dildos.
Go to Top of Page

designandtrade
Starting Member

5 Posts

Posted - November 02 2010 :  05:36:32  Show Profile  Reply with Quote
Hi Steve,

Firstly I'd like to say I am happy to see your problem was solved.

And than I would like to ask you to have a quick look on the link below as, up to now, you are/were the only VP-ASP user on Godaddy's host I found and maybe can help me.

I have a VP-ASP cart installed on Godaddy deluxe host but I am having difficulties with the mailing system.

The rough details are on

http://community.godaddy.com/groups/email/forum/topic/vp-asp-email-setup-problems-on-godaddys-host/#post-55147

If you could have a look on it, that would be very kind of you.

Thank you

Istvan
Go to Top of Page

Steve2507
VP-ASP Expert

590 Posts

Posted - November 02 2010 :  05:59:10  Show Profile  Reply with Quote
Hi Itvan,

Sorry but we are not hosted on godaddy, our sites are hosted in the UK on Donhost servers.


Steve
Sex toys from a UK sex shop including vibrators and dildos.
Go to Top of Page

designandtrade
Starting Member

5 Posts

Posted - November 02 2010 :  06:11:20  Show Profile  Reply with Quote
Oh, what a mistake from me.

Than sorry and thank you any way.

Istvan
Go to Top of Page

Steve2507
VP-ASP Expert

590 Posts

Posted - November 02 2010 :  06:17:48  Show Profile  Reply with Quote
No problem, sorry I can't be of any help.

You probably saw that the .com of our site is registered with godaddy.


Steve
Sex toys from a UK sex shop including vibrators and dildos.
Go to Top of Page

osgolf
Starting Member

18 Posts

Posted - November 12 2011 :  11:32:14  Show Profile  Reply with Quote
I tried following the suggestions above and am also getting Subscript out of range error on shopproductfeatures.asp line 102 (this is where I added the two new fields) when I try to add a product to the cart (shopaddtocart):

ArrCart(cExtraInfo,scartItem) = strpother1
ArrCart(cExtraMaxInfo,scartItem) = strpother2

Microsoft VBScript runtime error '800a0009'

Subscript out of range: '[number: 29]'

/shopproductfeatures.asp, line 102


My version 7 had cMaxCartAttributes=28 in the shop$db.asp file and I simply tried increasing that to 30 and adding the two new const at the bottom:

'Shopping cart attributes
const cMaxCartAttributes=30
Const cProductid = 1
Const cProductCode = 2
Const cProductname = 3
Const cQuantity = 4
Const cUnitPrice = 5
Const cDualPrice = 6
Const cOriginalPrice=7
Const cCategory=8
Const cDiscount=9
Const cMinimumQuantity=10
const cSupplierid=11
Const cDelivery=12
const CStockLevel=13
const Cotherinfo=14
const cGroupDiscount=15
const cProductFeatures=16
const cMaximumQuantity=17
const cProductimage=18
const cProductweight=19
const cProductassociated=20
const cProductMiniName=21

'6.50 - allow customers to upload images
const cuploadimagerequired=22
const cgraphicname1=23
const ccountgraphics=24

'700 - product bundles
const cbundleparentid=25
const cbundleqty=26
const cproducttype=27
const cfeatureotherpricing=28
const cExtraInfo=29
const cExtraMaxInfo=30

Any ideas how to fix this error? I appreciate your help!
Thanks, James

Edited by - osgolf on November 12 2011 11:38:12
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000