X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Product Options Customizaion ? (https://forum.x-cart.com/showthread.php?t=33019)

RichieRich 09-11-2007 01:11 PM

Re: Product Options Customizaion ?
 
Well done indeed

pyap 09-11-2007 01:19 PM

Re: Product Options Customizaion ?
 
Glad I could be helpful.

Enjoy.

RichieRich 09-11-2007 01:30 PM

Re: Product Options Customizaion ?
 
I just checked and this doesnt work in Firefox or Safari

pyap 09-11-2007 01:58 PM

Re: Product Options Customizaion ?
 
I have it working in the following browsers:

Firefox 2.0.0.6 for Mac
Safari 2.0.4 for Mac
IE 6.0.29 for PC
Firefox 2.0.0.6 for PC

typologist 09-15-2007 08:29 PM

Re: Product Options Customizaion ?
 
How do you validate, in order to make appear a warning message if no option is selected? If you dont do this, the first option is selected and added to the cart.

pyap 09-17-2007 07:53 AM

Re: Product Options Customizaion ?
 
You could validate with javascript, but it's a lot easier if you force a selection to start with:

Code:

<input type="radio" name="{$poname}" value="{$o.optionid}"
{if $o.selected eq 'Y'}checked="checked" {/if}
onclick="check_options();"/>


hhiker 09-17-2007 08:09 AM

Re: Product Options Customizaion ?
 
Quote:

Originally Posted by pyap
I have it working in the following browsers:

Firefox 2.0.0.6 for Mac
Safari 2.0.4 for Mac
IE 6.0.29 for PC
Firefox 2.0.0.6 for PC



Could you please tell me, did you do something different? I finally got back here to ask. The buttons work as in getting the right selection in the cart but they do not update in FF 2.0.0.6 for me. You can check this product (one with variants)

http://highlandhiker.com/Eagle-Creek-Tarmac-ES-22-Rolling-Carry-On-p-70.html

The sku and image are not changing in FF, only in IE.

Thanks!

pyap 09-17-2007 01:49 PM

Re: Product Options Customizaion ?
 
I flipped through your code, compared to mine, this should fix the problem:

Code:

/*
        Get product option value -modified
*/
function getPOValue(c) {       
        if (document.getElementsByName('product_options['+c+']')) {
                var radios = document.getElementsByName('product_options['+c+']');
                for (var i = 0; i < radios.length; i++) {
                        if (radios[i].checked) {
                                return radios[i].value;
                        }
                }
        }
}


I fixed the original post #18 to show this code. All that is changed is:

'po'+c is now 'product_options['+c+']'

My apologies. That is my fault. I didn't check the code that I posted.

hhiker 09-18-2007 08:45 AM

Re: Product Options Customizaion ?
 
Thanks Pyap!

It works perfectly in FF now. :)

I do appreicate your time in helping me get this working. I have just been pedal to the metal and not had time to stop and figure everything out.

RichieRich 09-18-2007 08:56 AM

Re: Product Options Customizaion ?
 
Quote:

Originally Posted by pyap
I have it working in the following browsers:

Firefox 2.0.0.6 for Mac
Safari 2.0.4 for Mac
IE 6.0.29 for PC
Firefox 2.0.0.6 for PC



It works in IE for me, but the price doesnt change for me when I change an option in other browsers.


All times are GMT -8. The time now is 09:36 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.