| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Product Options Dropdown "Select XXXX..." | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#31
|
|||||||
|
|||||||
![]() Hello,
I have a problem that my third option down is displaying selected="selected" after Please select xxx... This only appears on the the third one down, above and below it works fine. An example can be seen here: http://store.oceanriver.com/store/product.php?productid=16144 Thanks, Graham |
|||||||
#32
|
|||||||
|
|||||||
![]() Quote:
Check your code in customer_options.tpl it should look something like this: Code:
You are probably missing an if or a closing /if or a bracket.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#33
|
|||||||
|
|||||||
![]() Nope, it's exactly the same line. I've even tried cutting and pasting code directly out of some of the posts. Same result. Here is my code:
Code:
This happens for any product with three or more options. I've attached a screenshot. Thanks, Graham |
|||||||
#34
|
|||||||
|
|||||||
![]() Instead of the javascript in each of your products, you can instead add the following to your product.tpl file (or anywhere else).
{if $err eq "options"} <div class="ErrorMessage">{$lng.err_select_options}</div> {/if} Then add a language variable called "err_select_options" This assumes you did add the additional select option described above and that you always want all options selected. I'm working on an X-cart 4.1.11 site.
__________________
x-cart 4.1.11 x-cart 4.1.12 x-cart 4.2.3 x-cart 4.3.2 |
|||||||
#35
|
|||||||||
|
|||||||||
![]() I hate to beat a dead horse but I am having trouble with this.
I put this code in customer_options.tpl before {foreach from=$v.options item=o} <option>Select {$v.classtext|default:$v.class}...</option> Then added this to the product option java box if (document.getElementById('po3').selectedIndex == 0)
{ alert('Please select a size for your item.'); return false; } if (document.getElementById('po4').selectedIndex == 0) { alert('Please select a color for your item.'); return false; } else return true; When I go to the product the page loads fine but when you click add to cart the page pops the old warning triangle in the bottom left of IE. For all items with an option my first option is None Selected. All I want is a warning box to pop when an absent minded customer trys to add the None Selected to the cart. Mike |
|||||||||
#36
|
|||||||||
|
|||||||||
![]() Anyoe have any ideas on this?
|
|||||||||
#37
|
|||||||||
|
|||||||||
![]() Quote:
graham, i just discovered that i too was having this hangup. but my selected="selected" was only occurring on my 6th option. i pondered on what it could be as i sat and stared at the code, and then i figured i would simply remove selected="'selected" to see what would happen. well, to my surprise the issue went away and my 6th option displayed just as the first 5 did. i tested with 2 orders and nothing seems to have been affected. can those who know about code explain why removing selected="selected" fixed my issue and obviously had no bearing on the product being ordered? thanks in advance.
__________________
X-Cart Gold Plus 4.6.6 Altered Cart - Checkout One Altered Cart - Checkout One Payments Altered Cart - Cash Rewards Altered Cart - On Sale Smack Digital - CDSEO Smack Digital - CDSEO Rich Snippets Smack Digital - xCMS The xCart Store - xBanners2 Star Plugins - Cloud Zoom Heavily Customized by Starts Here Ltd. (UK) |
|||||||||
#38
|
|||||||
|
|||||||
![]() any way of getting this on 4.2.2
__________________
Version 5.3.1 |
|||||||
#39
|
|||||||||
|
|||||||||
![]() MAKE A BACK UP!!!!!!!
in skin1/modules/Product_Options/customer_options.tpl find this code starting around line 45 {foreach from=$v.options item=o} <option value="{$o.optionid}"{if $o.selected eq 'Y'} selected="selected"{/if}> change to this {foreach from=$v.options item=o} <option value="select">Select</option> <option value="{$o.optionid}">
__________________
xcart 5.1.2 |
|||||||||
#40
|
|||||||
|
|||||||
![]() hi can not find the above code here is my customer_options.php
PHP Code:
__________________
Version 5.3.1 |
|||||||
|
|||
X-Cart forums © 2001-2020
|