Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Altered cart tools problem

 
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4
 
Thread Tools
  #1  
Old 09-10-2020, 03:05 PM
 
Dougrun Dougrun is offline
 

X-Adept
  
Join Date: Apr 2012
Posts: 900
 

Default Altered cart tools problem

I know AC is no longer with us but hopefully someone has a clue..
simple problem i'm sure and its the only thing about the add-on that doesn't work now but when I click the checkbox above the column of checkboxes (to select all), it doesn't select all. Hasn't worked for several versions. Not sure if its a php thing or xcart thing. Any clues on what to look for?
Its not working on any of the tables for the abandoned carts, sent, reminders, logged errors, etc. Must be a function somewhere that needs fixing.
__________________
4.7.x xcart store
Business 5.4xx
Reply With Quote
  #2  
Old 09-11-2020, 08:33 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: Altered cart tools problem

Possibly the 'select all' javascript code just needs tweaking/updating to support a later jQuery version. Drop me a line if you want me to take a look.

Check your browser console when the error occurs.
__________________
xcartmods.co.uk
Reply With Quote
  #3  
Old 09-11-2020, 09:01 AM
 
Dougrun Dougrun is offline
 

X-Adept
  
Join Date: Apr 2012
Posts: 900
 

Default Re: Altered cart tools problem

Uncaught TypeError: $(...).datepicker is not a function
__________________
4.7.x xcart store
Business 5.4xx
Reply With Quote
  #4  
Old 09-11-2020, 09:07 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: Altered cart tools problem

I don't know anything about the AC tools, but try adding this code before the datepicker script in question...
Quote:
<script src="{$SkinDir}/lib/jqueryui/components/datepicker.min.js"></script>
or
Quote:
<script src="https://www.yourstore.com/skin/common_files/lib/jqueryui/components/datepicker.min.js"></script>
__________________
xcartmods.co.uk
Reply With Quote
  #5  
Old 09-11-2020, 10:09 AM
 
Dougrun Dougrun is offline
 

X-Adept
  
Join Date: Apr 2012
Posts: 900
 

Default Re: Altered cart tools problem

I dont think its the datepicker that controls that, it would be the date picker above it that i rarely use. The code for that box is:
Code:
<input type="checkbox" value="1" onclick="checkoutOne.selectAll(this);">


it says its in admin/checkout-one.php but i dont see it so that must be calling it from another file
Code:
require 'auth.php'; require $xcart_dir.'/include/security.php'; $page_page = 20; if (!$active_modules['Checkout_One']){ func_header_location('home.php'); } x_load('user'); if (file_exists($xcart_dir . '/include/common.php')){ include $xcart_dir . '/include/common.php'; } else { require $xcart_dir."/include/categories.php"; } require $xcart_dir.'/modules/Checkout_One/checkout_one_functions.php'; if (is_file($xcart_dir.'/modules/Buy_Together/buy_together_functions.php')){ require_once $xcart_dir.'/modules/Buy_Together/buy_together_functions.php'; } require $xcart_dir.'/modules/Checkout_One/Products.class.php'; $smarty->assign('categories', Products::load_categories(0)); require_once $xcart_dir."/modules/Checkout_One/JSON.php"; $json = new CO_Services_JSON(); $_ret = array(); x_load('cart');
__________________
4.7.x xcart store
Business 5.4xx
Reply With Quote
  #6  
Old 09-11-2020, 10:13 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: Altered cart tools problem

One JS error can stop other JS code working, so may not be related to the checkout.

PM me your URL and I can take a quick look at the checkout (or wherever the error occurs).
__________________
xcartmods.co.uk
Reply With Quote
  #7  
Old 09-11-2020, 10:33 AM
 
Dougrun Dougrun is offline
 

X-Adept
  
Join Date: Apr 2012
Posts: 900
 

Default Re: Altered cart tools problem

think i found it in admin.tpl
Code:
selectAll:function(controller){ $("input[name='cartids[]']").attr({checked:($(controller).attr('checked') == 'checked' ? 'checked' : false)}); checkoutOne.showSubmit(controller.form, 'cartids[]')
__________________
4.7.x xcart store
Business 5.4xx
Reply With Quote
  #8  
Old 09-11-2020, 10:45 AM
 
Dougrun Dougrun is offline
 

X-Adept
  
Join Date: Apr 2012
Posts: 900
 

Default Re: Altered cart tools problem

If i change the 'checked' : false)}); to true, it lets me select all, but it doesnt toggle it off if I uncheck it.
__________________
4.7.x xcart store
Business 5.4xx
Reply With Quote
  #9  
Old 09-11-2020, 10:48 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: Altered cart tools problem

Might need to use .prop instead of .attr

https://learn.jquery.com/using-jquery-core/faq/how-do-i-check-uncheck-a-checkbox-input-or-radio-button/
__________________
xcartmods.co.uk
Reply With Quote

The following user thanks PhilJ for this useful post:
Dougrun (09-11-2020)
  #10  
Old 09-11-2020, 11:27 AM
 
Dougrun Dougrun is offline
 

X-Adept
  
Join Date: Apr 2012
Posts: 900
 

Default Re: Altered cart tools problem

changing that doesn't fix the toggle but it still works to check them. thanks.
__________________
4.7.x xcart store
Business 5.4xx
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 08:56 PM.

   

 
X-Cart forums © 2001-2020