Jump to content

bsmither

Member
  • Posts

    18,013
  • Joined

  • Last visited

  • Days Won

    605

Posts posted by bsmither

  1. Ignore the phishing attack messages. It's a known issue and is absolutely misleading and harmless. It will get fixed one of these days.

    The Invalid Security Token messages are dated a week ago, so maybe those are from CC629? If so, then what happened there is likely that you used the browser's back button to get a prior page and then saved a form, or had two or more tabs open and saved a form, switched to the second tab and saved the form there, switched to a third tab and saved the form there, etc.

    In one of the versions in the CC64X family, stringent use of the Security Token was mostly relaxed. Now you can do what you couldn't do as described above.

    CC629 is not PHP8 compliant. CC649 requires PHP7.4 or higher, latest tested on PHP8.1.

    No new entries in PHP's error_log file???

    Did you find the web server's error logs in your hosted account's control panel?

  2. There are browser add-ons that will auto-fill-in form fields if those form fields are recognized by the add-on to be for a well-known purpose. This auto-fill-in may not be visible to the browser user. Thus, even if the user fills in the appropriate username and email address, the add-on might send out other form values. (How the add-on would get confused about the different versions of CubeCart, I have no answer.)

    So, make sure this isn't happening for you.

    I notice in the database screen grab, there is a value present in the 'verify' column. This means the Admin->passwordRequest() function did get that far, but failed to prepare an output to be emailed.

    So, to prepare an output to be emailed, the function needs your language code. Looking at the same record in the database, make sure that there is a value in the 'language' column.

    If there is, then look in the database table CubeCart_email_content, and make sure there is a record for 'content_type' of 'admin.password_recovery' with 'language' being what was noted above.

    Next, look in the database table CubeCart_email_log to see if a Admin Password Recovery email was even attempted.

    I also see in the screen grab that value in the 'password column' obviously has been manually changed. The value stored in this column is complicated to derive.

    This what should have been in the email, after the part of your store address and admin file name:

    ?_g=recovery&email=email&validate=verify

    where email and verify are the values found in the database record.

    What version of CubeCart did you upgrade from?

    Also, because the data shown in the database screen grab is sensitive security data, please delete these images from your post above.

  3. Try this structure.

    Find:
    
    } else {
        if (isset($_POST['multi-order']) && !empty($_POST['multi-order'])) {
            // Update selected orders to given status
    
    Between the first and second line, put the revised custom code:
    
    } else {
    
        if (isset($_POST['venue_sold_site'])) { foreach ($_POST['venue_sold_site'] as $order_id => $site_name) { $GLOBALS['db']->update('CubeCart_order_summary', array('venue_sold_site' => $site_name), array('cart_order_id' => $order_id)); } $GLOBALS['main']->successMessage("One or more orders Sold Sites were updated"); }
        if (isset($_POST['all_order_date'])) { foreach ($_POST['all_order_date'] as $order_id => $site_name) { $GLOBALS['db']->update('CubeCart_order_summary', array('all_order_date' => $site_name), array('cart_order_id' => $order_id)); } $GLOBALS['main']->successMessage("One or more orders All Order Dates were updated"); }
        if (isset($_POST['all_delivery_date'])) { foreach ($_POST['all_delivery_date'] as $order_id => $site_name) { $GLOBALS['db']->update('CubeCart_order_summary', array('all_delivery_date' => $site_name), array('cart_order_id' => $order_id)); } $GLOBALS['main']->successMessage("One or more orders All Delivery Dates were updated"); }
        if (isset($_POST['feedback'])) { foreach ($_POST['feedback'] as $order_id => $site_name) { $GLOBALS['db']->update('CubeCart_order_summary', array('feedback' => $site_name), array('cart_order_id' => $order_id)); } $GLOBALS['main']->successMessage("One or more orders Feedbacks were updated"); }
    
        if (isset($_POST['multi-order']) && !empty($_POST['multi-order'])) {
            // Update selected orders to given status

    This will do each column in turn.

  4. Here is a condensed and abridged summation of the code (and a tad bit more) that was posted above:

    if       (isset($_POST['multi-order']))
    } elseif (isset($_POST['venue_sold_site'])) 
    } elseif (isset($_POST['all_order_date']))
    } elseif (isset($_POST['all_delivery_date']))
    } elseif (isset($_POST['feedback']))
    } elseif (isset($_GET['search']))        
    } else { $where = (isset($_GET['customer_id']))
    }

    This shows that only one of these choices will ever happen.

    So, if you add a new item of data to 'venue_sold_site' and 'feedback', you will not get the 'feedback' processed because 'venue_sold_site' got to it first, and then that's all there is to it!

    Any number of rows can have new data added, as long as all of that new data is in the same column, per Save.

  5. There needs to be a review of the edits made to admin, /sources/order.index.inc.php.

    This file is the PHP code that will process and database the values for $_POST['venue_sold_site'], $_POST['all_order_date'], $_POST['all_delivery_date'], and $_POST['feedback'].

     

  6. That particular error is a result message from the database server. The database server has a special table that holds all the known timezones.

    However, a typical installation of the database server does not include populating this special table with a list of timezones.

    The person responsible for managing the database server (usually your hosting provider) is the only person who can get the table populated from this list.

    There are other conversations on this forum that discuss it, but ultimately, your hosting provider will need to deal with this. It is not unique to CubeCart.

    You can quiet the error notices by making these edits:

    /controllers/controller.index.inc.php
    /controllers/controller.admin.pre_session.inc.php
    
    Near line 28, find:
    
    $GLOBALS['db']->misc("SET @@time_zone = '".$time_zone."'", false, $debug);
    
    Change to:
    
    // $GLOBALS['db']->misc("SET @@time_zone = '".$time_zone."'", false, $debug);

     

  7. Please first check for entries logged in the admin, System Error Log.

    Next, enable debug mode (admin, Store Settings, Advanced tab, then enter your local IP address in the next field - www.showmyip.com).

    Show the Minnesota category - which will want to show Illinois products. At the bottom of the page, scan through the database queries looking for the one that resembles the following:

    SELECT I.product_id FROM `CubeCart_category_index` as I, `CubeCart_inventory` as INV WHERE I.cat_id = 1 AND I.product_id = INV.product_id AND INV.status = 1

    where 'I.cat_id = x' will have 'x' equal the actual cat_id of either Minnesota or Illinois.

  8. A Zone, for whatever purpose (i.e., having countries), but no shipping rates for that zone, will not have any rates to offer the customer to choose.

    Yes, the zone will match (Canada, for example), but there will be no rate available -- neither because, for any of the rates that could be supplied, none fit the conditions, nor because there are no rates at all. Thus (in later versions of AIOS), the module will try to match a rate's conditions listed in "Rest of World".

    So, short answer, a zone with no rates is as good as being disabled (suspended), and as good as having been deleted, and as good as not having been created at all.

    The point of the "Uncheck to Suspend" feature is to keep the zone with its list of rates intact, but to not use them.

    • Like 1
  9. That "double-right-angle" and Edit icon on the Add new shipping rate line is definitely not supposed to be there. So, in the module's /skin/sdmin/shipping_rates.tpl, double check this line (broken apart for clarity):

            <tr>
              <td colspan="7">
                <a href="#" class="aios-add">
                  <img src="{$SKIN_VARS.admin_folder}/skins/{$SKIN_VARS.skin_folder}/images/add.png"
                       alt="{$LANG.all_in_one_shipping.add_rows}"
                       title="{$LANG.all_in_one_shipping.add_rows}"
                       width="16"
                       height="16"
                       border="0"
                       style="padding:0 5px;" />
                  {$LANG.all_in_one_shipping.add_new_shipping_rates}
                </a>
              </td>
            </tr>

    Please remind us about when the sort-order on a rates panel was discussed. (Found it, early Feb 2018.)

    https://forums.cubecart.com/topic/53313-all-in-one-shipping-module-gets-its-rates-sorted/

    If a sort order fails to 'stick', either the database is missing the new column, 'sort_order', in the CubeCart_shipping_rates table, or the code to process the sort_order went missing.

    Your local zip-code zone vs your state zone gets their priorities set from the drag-n-drop order as they appear, top to bottom, on the Shipping Zones tab.

  10. This can be simplified:

    ($product.quantity * $product.cost_price / $product.quantity)
    
    is like:
    
    A*B
    ---
     A
    
    The rules of algebra will have
    the A variables cancel each other.

    But if {$product.quantity} is zero, that will cause a serious problem.

  11. If using Firefox, there may be a way to find the fault. Other browsers may or may not do this as well.

    On this page, right click with the mouse. There may be a menu option to show the page source. If so, click that choice and new window will open.

    This window will show the page's source - hopefully color-coded.

    Scroll through the code looking for anything in a bright red color.

  12. "is still showing as way above in the first post"

    I do not understand this. Your original post shows a selected area screen capture that obviously the CSS is not getting applied to any of the page.

    Is that still happening?

    The code posted above seems to be that of two tables, basically side-by-side if the browser window is wide enough.

    However, the last two lines of code suggests that you are ending a table that encloses the previously mentioned two tables. But there is no beginning code to start that enclosing table.

  13. Please try this edit. (I haven't verified this myself.) In the file /controllers/controller.admin.pre_session.inc.php:

    Find:
    
    //Initialize Catalogue
    $GLOBALS['catalogue'] = Catalogue::getInstance();
    
    Add after:
    
    // Instantiate Cart
    $GLOBALS['cart'] = Cart::getInstance();

    This particular white screen situation hasn't been found in prior versions because it is directly related to PHP8 (vs PHP7).

    I will post this to the Github. There are several possible solutions to the essential issue here, this probably providing the broadest coverage for any other unknown situations.

  14. The "smoking gun" is this:

    [Exception] /home/xxxxx/public_html/classes/order.class.php:194
    - method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given 

    When in admin, an instantiation of the Cart class (assigned to the variable $GLOBAL['cart']) just does not exist.

    How this has not been found many, many versions ago, I cannot imagine.

    Working on it.

  15. A white screen.

    That suggests that PHP crashed. I believe PHP cannot crash so bad that it fails to log an entry in its own error_log. So, if not having done so already, please see:

    https://forums.cubecart.com/topic/51550-how-to-create-the-error-log/

    However, I have also found that Smarty, the template rendering engine, if there is a syntax error in the template, will cause a white screen without allowing PHP to log the offending line of the template. (There may be a work-around.)

    (The undefined variable is covered in this issue in the Github:)

    https://github.com/cubecart/v6/issues/3116

    In the browser's Developer's Tools (engaged via F12), the Network tab will show the POST action. IF! a response comes back from the POST, it will usually be a command to GET a certain page. The browser then sends a GET request for that page, the response being, perhaps happening here with you, an error: 500.

    If you see a GET that followed the POST, then we know that CubeCart processed the POST - and hopefully databased the form's data.

    If there is no GET after the POST, or no POST at all, then something went wrong processing the data.

    There is also the possibility, however unlikely, that CubeCart has an undiscovered bug that the code execution simply comes to a dead end - with nothing to show for it.

    (I haven't yet tried this, but it seems to me that if CubeCart cannot send the debug report, it stays "spooled" internally until a page can be sent out. So, after the white screen, the next page received could have several debug sections. If so, the first would be the POST being processed, the second would be the follow-on GET request that faulted, and the third would be the GET request that succeeded.)

  16. Just another thought: if you have no digital products (which would require no shipping anyway), maybe just make it unable to pay for the order if the delivery address is international.

    In whatever Payment Gateway you use, the admin settings page has a tab for "Allowed Zones". Enter only those countries you are willing to ship to.

    If the customer can't pay for the order, well......

     

×
×
  • Create New...