• Page 1 of 1
  • 1
Problem with goods options
Admin8043
Posts: 12
Reputation: 0

Message # 1 | 8:36 AM
Hi,
I read the Ucoz manual and also the forum but I couldn't find a solution to my problem.

And the problem is in the E-shop with the goods options - it is impossible to add a product to the cart without choosing all of the options and it won't let clients to choose the "without filed" with price 0.00 from the drop-down menu of the options so it won't add aditional value to the price. It shows a message that choosing all of the options is required.

I restored the default template of the Item Page a couple of times but it keeps doing the same thing. I can't figure out what is happening. Can anyone advise me what to do?

Thanks a lot!
Sunny
Posts: 9296
Reputation: 456

Message # 2 | 2:37 PM
Admin8043, please provide the URL of your website, and a link to the product with the problem.
I'm not active on the forum anymore. Please contact other forum staff.
Admin8043
Posts: 12
Reputation: 0

Message # 3 | 2:08 PM
Hi,
The URL is http://fliongata.ucoz.com
The problem is in general with the template of the Item Page so it shows it no matter the product - anytime an order is about to be made.

Thanks..
Sunny
Posts: 9296
Reputation: 456

Message # 4 | 8:54 AM
Admin8043, could you provide a screenshot of the problem? As far as I can see items are added to the cart without any problems.
I'm not active on the forum anymore. Please contact other forum staff.
Admin8043
Posts: 12
Reputation: 0

Message # 5 | 1:19 PM
Hi,

They are added, yes, but the thing is in the item page when you add options, the price changes and when you go to the Cart page the price is lower and doesn't include the previously added options.

Here is a screenshot of the product with one option added and a screenshot of My cart page with no options showed and the price is without the option, i.e. the base price.



Added (2014-07-22, 7:19 AM)
---------------------------------------------
Just to let you know - when I restore the standard template, everything works wiht prices and options, but another issue appears... It won't let clients buy a product without adding ALL of the options. It shows this message:

Attachments: 4743362.jpg (39.1 Kb) · 4429413.jpg (14.5 Kb)
Post edited by Admin8043 - Tuesday, 2014-07-22, 1:20 PM
Sunny
Posts: 9296
Reputation: 456

Message # 6 | 1:57 PM
Admin8043, go to Control Panel -> Design customization -> Shopping cart, and replace the following code:
Code
$('#'+pref+'-'+id+'-options').find('input:checked, select')


with:
Code
$('#'+pref+'-'+id+'-options-selectors').find('input:checked, select')


Don't forget to create a template backup before editing the templates.

I'm not active on the forum anymore. Please contact other forum staff.
Admin8043
Posts: 12
Reputation: 0

Message # 7 | 2:11 PM
I did and prices with options work but it still requires all of the options to be selected.
Post edited by Admin8043 - Tuesday, 2014-07-22, 2:11 PM
Sunny
Posts: 9296
Reputation: 456

Message # 8 | 3:01 PM
Admin8043, please provide a screenshot of the exact error message and the link to the page where it occurs. I tried adding the item from your screenshot http://fliongata.ucoz.com/shop/205/desc/svatbena-pokana-ina , and there are no error messages about the options.
I'm not active on the forum anymore. Please contact other forum staff.
Admin8043
Posts: 12
Reputation: 0

Message # 9 | 8:39 AM
Here it is: [url]http://fliongata.ucoz.com/shop/205/desc/svatbena-pokana-ina?lfRIdv[url]

And here is the screenshot. Can you please try again.


Added (2014-07-23, 2:39 AM)
---------------------------------------------
Now I am convinced that the problem is in the code of the shopping cart of the default template Lilianstore. And to be more specific:

1. When I use the default code of the shopping cart - adding products to the cart works, but it doesn't add the desired options to the price.
2. When I use the default code of the shopping cart and only changing the codes you told me to change (in your message N.6 above), it showes the error message that all of the options should be selected.

I can't figure a solution myself except if we can use a default code of the shopping cart from similar eshop template like "Prettythings" which is paid btw. : )

Sunny, Thank you for your help so far!
Attachments: 6409486.jpg (88.7 Kb)
Post edited by Admin8043 - Wednesday, 2014-07-23, 8:40 AM
Sunny
Posts: 9296
Reputation: 456

Message # 10 | 1:51 PM
Admin8043, Control Panel -> Design -> Shopping cart. Replace:
Code

function add2Basket(id,pref){ if(lock_buttons) return false; else lock_buttons = 1; var opt = new Array(); $('#b'+pref+'-'+id+'-basket').attr('disabled','disabled'); $('#'+pref+'-'+id+'-basket').removeClass('done').removeClass('err').removeClass('add').addClass('wait').attr('title',''); $('#'+pref+'-'+id+'-options').find('input:checked, select').each(function(){ opt.push(this.id.split('-')[3]+(parseInt(this.value) ? '-'+this.value :''));}); _uPostForm('',{type:'POST',url:'/shop/basket',data:{'mode':'add', 'id':id, 'pref':pref, 'opt':opt.join(':'), 'cnt':$('#q'+pref+'-'+id+'-basket').attr('value')}}); return false;}

function buyNow(id,pref){ if(lock_buttons) return false; else lock_buttons = 1; var opt = new Array(); $('#b'+pref+'-'+id+'-buynow').attr('disabled','disabled'); $('#'+pref+'-'+id+'-buynow').removeClass('done').removeClass('err').removeClass('now').addClass('wait').attr('title',''); $('#'+pref+'-'+id+'-options').find('input:checked, select').each(function(){ opt.push(this.id.split('-')[3]+(parseInt(this.value) ? '-'+this.value :''));}); _uPostForm('',{type:'POST',url:'/shop/basket',data:{'mode':'add', 'id':id, 'pref':pref, 'opt':opt.join(':'), 'cnt':$('#q'+pref+'-'+id+'-basket').attr('value'), 'now':1}}); return false;}


with:
Code

         function add2Basket(id,pref){
             if(lock_buttons) return false; else lock_buttons = 1;
             var opt = new Array();
             var err_msg = '';
             $('#b'+pref+'-'+id+'-basket').attr('disabled','disabled');
             $('#'+pref+'-'+id+'-basket').removeClass('done').removeClass('err').removeClass('add').addClass('wait').attr('title','');
             $('#'+pref+'-'+id+'-options-selectors').find('input:checked, select').each(function(){
                 opt.push(this.id.split('-')[3]+(this.value !== '' ? '-'+this.value :''));

                 if(this.value !== ''){
                     opt.push(this.id.split('-')[3]+(this.value !== '' ? '-'+this.value :''));
                 }else{
                     err_msg += '<li>'+$(this).parent().parent().find('span.opt').html().replace(':', '')+'</li>';
                 }
             });

             if(err_msg == ''){
                 _uPostForm('',{type:'POST',url:'/shop/basket',data:{'mode':'add', 'id':id, 'pref':pref, 'opt':opt.join(':'), 'cnt':$('#q'+pref+'-'+id+'-basket').attr('value')}});
                 ga_event('basket_add');
             }else{
                 lock_buttons = 0;
                 shop_alert('<div class="MyWinError">The options<ul>'+err_msg+'</ul>are required</div>','Notice','warning',350,100,{tm:8000,align:'left',icon:'http://s101.ucoz.net/img/icon/warning.png', 'onclose': function(){  $('#b'+pref+'-'+id+'-basket').removeAttr('disabled'); $('#'+pref+'-'+id+'-basket').removeClass('wait').addClass('add');  }});
             }
             return false;
         }

         function buyNow(id,pref){
             if(lock_buttons) return false; else lock_buttons = 1;
             var opt = new Array();
             var err_msg = '';
             $('#b'+pref+'-'+id+'-buynow').attr('disabled','disabled');
             $('#'+pref+'-'+id+'-buynow').removeClass('done').removeClass('err').removeClass('now').addClass('wait').attr('title','');
             $('#'+pref+'-'+id+'-options-selectors').find('input:checked, select').each(function(){
                 if(this.value !== ''){
                     opt.push(this.id.split('-')[3]+'-'+this.value);
                 }else{
                     err_msg += '<li>'+$(this).parent().parent().find('span.opt').html().replace(':', '')+'</li>';
                 }
             });
             if(err_msg == ''){
                 _uPostForm('',{type:'POST',url:'/shop/basket',data:{'mode':'add', 'id':id, 'pref':pref, 'opt':opt.join(':'), 'cnt':$('#q'+pref+'-'+id+'-basket').attr('value'), 'now':1}});
                 ga_event('basket_buynow');
             }else{
                 lock_buttons = 0;
                 shop_alert('<div class="MyWinError">The options<ul>'+err_msg+'</ul>are required</div>','Notice','warning',350,100,{tm:8000,align:'left',icon:'http://s101.ucoz.net/img/icon/warning.png', 'onclose': function(){ $('#b'+pref+'-'+id+'-buynow').removeAttr('disabled'); $('#'+pref+'-'+id+'-buynow').removeClass('wait').addClass('add');  }});
             }

             return false;
         }

I'm not active on the forum anymore. Please contact other forum staff.
Admin8043
Posts: 12
Reputation: 0

Message # 11 | 2:29 PM
This helped!
Thank you so much!
You are the best, keep up the good work! : )
  • Page 1 of 1
  • 1
Search: