| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Need help with options script | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() I'm using a validation script, and need some help. I have framed artwork, 7 sizes, 5 frame options. Howver the smallest size doesn't come framed. So I need to check they've picked a size, and a frame, unless the size they picked was the first option, then a frame isn't required. Here's what I've messed with so far
Code:
__________________
McPace 4.1.12 |
|||||||||
#2
|
|||||||||
|
|||||||||
![]() OK I think the problem is in checking two elements in one if statement, b/c if I start with
Code:
They both work fine. Now if I add the two variable if statement it doesn't add to cart, the function works, but it never adds to cart. Code:
I'm gonna have to figure out what's up since I want two statements that check multiple values
__________________
McPace 4.1.12 |
|||||||||
#3
|
|||||||||
|
|||||||||
![]() I got rid of that return true inside the if, I don't get it, it all seems to work, but the product doesn't add to cart, the page just reloads with ?&err=options in the URL
currently using: Code:
__________________
McPace 4.1.12 |
|||||||||
#4
|
|||||||||
|
|||||||||
![]() Seriously! I just tried pasting the code onto another product and each product has a different class id!? There has to be a better way to do this validation!?
__________________
McPace 4.1.12 |
|||||||||
#5
|
|||||||||
|
|||||||||
![]() Ahh OK now I get it, it is working. But when it returns true, there is no product variant that matches that... so it can't add a product to the cart. Hmmm what to do now?
__________________
McPace 4.1.12 |
|||||||||
#6
|
|||||||||
|
|||||||||
![]() I'm just really annoyed at this point
__________________
McPace 4.1.12 |
|||||||||
#7
|
|||||||||
|
|||||||||
![]() OH FOR THE LOVE!
If I put in this code: Code:
And have product variants that say select art size, select frame style, then it works perfectly. So does anyone know how I can take this and apply it universally without using a specific products poID?
__________________
McPace 4.1.12 |
|||||||||
|
|||
X-Cart forums © 2001-2020
|