| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Product Options Dropdown "Select XXXX..." | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#41
|
|||||||||
|
|||||||||
![]() well, you shouldn't...
read it carefully.... .tpl not php
__________________
xcart 5.1.2 |
|||||||||
#42
|
|||||||
|
|||||||
![]() sorry thank you
__________________
Version 5.3.1 |
|||||||
#43
|
|||||||||
|
|||||||||
![]() note that this will only add a select option to all product options.
YOu will still need to add appropriate javascript
__________________
xcart 5.1.2 |
|||||||||
#44
|
|||||||
|
|||||||
![]() thanks
__________________
Version 5.3.1 |
|||||||
#45
|
|||||||
|
|||||||
![]() javascript to each product?
__________________
Version 5.3.1 |
|||||||
#46
|
|||||||||
|
|||||||||
![]() yes to each one... does every product ahve a color option?
__________________
xcart 5.1.2 |
|||||||||
#47
|
|||||||
|
|||||||
![]() Quote:
yes
__________________
Version 5.3.1 |
|||||||
#48
|
|||||||
|
|||||||
![]() I'll drag this up again....
there's gotta be a better error chjeck than placing it it in every product entry? no? dammit!
__________________
------------------- 4.2.2 4.1.9 |
|||||||
#49
|
|||||||
|
|||||||
![]() OK, so I just added a blank value to the option:
<option value="">Select {$v.classtext|default:$v.class}...</option> now it uses the xcart javascript error which I changed to: Please select size and colour. Works a chalm.
__________________
------------------- 4.2.2 4.1.9 |
|||||||
|
#50
|
|||||||||
|
|||||||||
![]() Getting the idea from this thread, I came up with an alternative product options validation script for the product options (for a site that I've been working on) that will get any select drop-down elements that their id is something llike "po118", "po119", etc (which is how the option drop-downs are named from x-cart) and display an alert message if the customer has any of these select boxes selected at their 1st option (which could be a hard-coded "select size" option, and not a specific size). So, in this way, the customer is prompted to select for every option drop-down, a specific option (other than the 1st one) in order to be able to proceed to checkout. Actually, I use a regular expression in the getElementById() method. So, someone could even import that script in a massive csv product/variants import and have the same script for each product (which is what I'm planning to do next). The code below is for a product with 2 option groups. Goes without saying, it could be replicated for any number of options.
Code:
__________________
Vasilis Vrontisis X-Cart Development, Maintenance & Customization https://[URL="http://www.craftforweb.com"]craftforweb.com[/url] vasilis@craftforweb.com |
|||||||||
|
|||
X-Cart forums © 2001-2020
|