X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 4 (https://forum.x-cart.com/forumdisplay.php?f=45)
-   -   Altered cart tools problem (https://forum.x-cart.com/showthread.php?t=77987)

Dougrun 09-10-2020 03:05 PM

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.

PhilJ 09-11-2020 08:33 AM

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.

Dougrun 09-11-2020 09:01 AM

Re: Altered cart tools problem
 
Uncaught TypeError: $(...).datepicker is not a function

PhilJ 09-11-2020 09:07 AM

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>

Dougrun 09-11-2020 10:09 AM

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');


PhilJ 09-11-2020 10:13 AM

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).

Dougrun 09-11-2020 10:33 AM

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[]')


Dougrun 09-11-2020 10:45 AM

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.

PhilJ 09-11-2020 10:48 AM

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/

Dougrun 09-11-2020 11:27 AM

Re: Altered cart tools problem
 
changing that doesn't fix the toggle but it still works to check them. thanks.


All times are GMT -8. The time now is 03:40 PM.

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