Jump to content

bsmither

Member
  • Posts

    18,013
  • Joined

  • Last visited

  • Days Won

    605

Posts posted by bsmither

  1. Site Documents? The database table CubeCart_documents can hold 2^24 bytes (16.7 million) - be aware that multi-byte unicode can be one, two, or three bytes per certain characters.

    Also, the web server has configurable limits on the total size of upload payload. (Consult the web server configuration files.)

    Also, PHP has configurable limits on the total size of accepting uploadable data. (Consult PHP's init file. These settings can be seen via CubeCart's admin, PHP Info page - bottom link in admin Nav pane.)

     

  2. CubeCart 6.2.1 has coding syntax incompatible with PHP 7.4 and newer.

    Cubecart 6.4.7 has all troublesome coding syntax fixed to work with PHP 8.1.

    I have not seen a 503 Error, even if it were to have been caused by CubeCart. But, to begin searching for the problem, create the error log.

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

    And, I have not traced how an admin account links to a customer account.

  3. This is my plan of attack:

    In Store Settings, Features tab, Misc section, "Force Order Completed Emails" to be unckecked.
    In Filemanager-Images, upload a "Under Construction" image.
    Give that image a new name -- the name of the customer, perhaps.
    In Filemanager-Downloads, upload that same image (with the new name).
    Add a new product for the service you are performing (bespoke image).
    .Fill in General, Description, Pricing, and Categories tabs.
    .Save & Reload.
    .On Images tab, select as Master Image the Under Construction image.
    .On the Digital tab, select the Under Construction image.
    .Save & Reload.
    .Verify all settings remained.
    Clear CubeCart's cache.
    View the product on the storefront.

    When purchasing this product, CubeCart will create a downloadable link for the customer.
    Currently, when the customer checks their Downloadable purchases, that download link will be the Under Construction image.

    Now, create the bespoke image.
    .Name it the same as the new name (customer's name?) specified earlier.
    .Upload it using Filemanager-Downloads (to the same location if putting it in a sub-folder).
    .This bespoke image will replace the Under Construction downloadable image.

    Set the order status to Complete.

    Now, when the customer checks their Downloadable purchases, the image that will be downloaded will be the bespoke image.

    We need to add the thumbnail of the downloadable image to the email "Order Complete".

    TODO -- Notes:

    In assignOrderDetails() hook, add the image link to the medium variant of the product's downloadable image
    . $GLOBALS['smarty']->assign('DATA', $this->_email_details['order_summary']); gets the cart_order_id
    . $GLOBALS['smarty']->assign('PRODUCTS', $this->_email_details['products']); gets the order_inventory_id and product_id
    . product_id gets getFileInfo() data
    . if mimetype:image, create and get medium image
    . Catalogue->imagePath() gets URL of medium image
    . add URL to PRODUCTS dataset

    Add link of product['medium_image'] in email contents.

     

     

  4. The response from the site is (for me) a 500 Error (not 505).

    I also get a cookie, which was set by CubeCart. So we can say that the web server did start PHP and executed the index.php script, and CubeCart did its thing up to some point after making a cookie available.

    So, if, in Cpanel, you can find a PHP error_log file, or maybe a web server error log, there might be the reason for the problem.

    If there is no error log to be found in Cpanel, please see:

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

     

  5. I have never seen that error before.

    For your browser, press F12 on the keyboard. This should bring up the browser's Developer Tools. View the Network tab.

    Now, request your site's homepage.

    The GET request should show. On that same line will be the response code. Click on that line, and a new section should open with all the details of the request and response.

    See if there is any more info (Headers section) explaining why the 505.

  6. Thank you for this. PHP 8 does not like counting nothing.

    Replace the hook admin.product.tabs.php with the following content:

    <?php
    	if (!defined('CC_INI_SET')) {
    		die('Access Denied');
    	}
    	if($result[0]['product_id'] > 0){
    		$existing_orders = $GLOBALS['db']->select('`'.$GLOBALS['config']->get('config', 'dbprefix').'CubeCart_order_inventory` LEFT JOIN `'.$GLOBALS['config']->get('config', 'dbprefix').'CubeCart_order_summary` USING (`cart_order_id`)', '`'.$GLOBALS['config']->get('config', 'dbprefix').'CubeCart_order_summary`.*', array('product_id' => (int)$result[0]['product_id']),'order_date DESC');
    			$product_orders_thead = array(
    			  'cart_order_id'   => $lang['orders']['order_number'],
    			  'cart_oid'   => $lang['common']['order_id'],
    			  'cart_customer' => $lang['orders']['customer_name'],
    			  'gateway_name' => $lang['orders']['gateway_name'],
    			  'shipping_date' => $lang['orders']['shipping_date'],
    			  'shipping_method' => $lang['orders']['shipping_method'],
    			);
    		$GLOBALS['smarty']->assign('PRODUCT_ORDERS_TAB_CONTENT_THEAD',$product_orders_thead);
    		if ($existing_orders === false) { $existing_orders = array(); }
    		$GLOBALS['smarty']->assign('PRODUCT_ORDERS',$existing_orders);
    		$GLOBALS['hook_tab_content'][] = CC_ROOT_DIR.CC_DS.'modules'.CC_DS.'plugins'.CC_DS.'Product_Appearances'.CC_DS.'skin'.CC_DS.'edit_product'.CC_DS.'product.tpl';
    		$GLOBALS['main']->addTabControl($lang['orders']['title_orders'], 'orders',null,null,count($existing_orders),'_self',10);
    
    	}

    This should work better under PHP 8.

  7. IF! there is an issue of interference between a new category named 'Sale' and CubeCart's "Sale" feature, then by using any other name will get around that interference.

    However, the products that have the new "ForSale" category assigned to them will not actually be on sale -- unless CubeCart's Sale mode is enabled and those products have a Sale Price. However, those same products could have their Retail Price temporarily lowered to be at a "Reduced Price", ignoring any Sale Price, and not enabling CubeCart's Sale mode.

    You said: The category appears as selected for the product but does not appear in the Category index table.

    In CubeCart's Store Settings, Advanced tab, enable Debug mode and enter your local IP address in the next field (www.showmyip.com). Save.

    Edit a product, add the "ForSale" category as a secondary category to the product. Save.

    Now, at the bottom of the page is a grey debug section (maybe two sections).

    In the first section will be all the database queries executed when the data was saved. Look for a "DELETE FROM CubeCart_category_index" followed by "INSERT INTO CubeCart_category_index" (or something close to that).

    The cat_id of "ForSale" should be in the INSERT query.

  8. Referring specifically to items that are on sale, CubeCart must have Sale Mode enabled - either a global percent discount that affects all products, or a per-product value that gets set in the product's pricing structure.

    If per-product, an item is considered on sale if the Sale Price is less than the Retail Price but greater than zero.

    Creating a category named 'Sale' might interfere with CubeCart's 'state-of-being' (not really a category but is displayed the same way) of its Sale mode feature.

    On CubeCart's storefront Navigation (Shop by Category), the 'Sale' choice will be included in the list if Sale mode is enabled and there are products that have the required pricing structure.

     

  9. And the customer's email, used for your experiments, is not one hooked to your real email used as the From in your store?

    Try this: in the snippet "BCC's the admins on all customer emails":

    Change:
    //$this->_mailer->SMTPDebug = 2;
    //$this->_mailer->Debugoutput = 'error_log';
    
    To:
    $this->_mailer->SMTPDebug = 4;
    $this->_mailer->Debugoutput = 'error_log';

    Save.

    As an experiment, I created an assistant administrator using a friend's email address, and checked the "Receive order status emails" checkbox.

    Have CubeCart clear its internal cache.

    (Be sure to have the error_log configured according to:)

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

    This will have the Mailer write an event sequence to the error log (but not CubeCart's System Error Log).

    You should see things like:

    [21-Nov-2022 19:33:10 America/Los_Angeles] CLIENT -> SERVER: MAIL FROM:<storeMainAdminName@storeDomain.com>
    
    [21-Nov-2022 19:33:10 America/Los_Angeles] SMTP INBOUND: "250 2.1.0 OK z11-20020aa79e4b000000b0056c0d129edfsm9395132pfq.121 - gsmtp"
    [21-Nov-2022 19:33:10 America/Los_Angeles] SERVER -> CLIENT: 250 2.1.0 OK z11-20020aa79e4b000000b0056c0d129edfsm9395132pfq.121 - gsmtp
    
    [21-Nov-2022 19:33:10 America/Los_Angeles] CLIENT -> SERVER: RCPT TO:<customer@example.com>
    
    [21-Nov-2022 19:33:10 America/Los_Angeles] SMTP INBOUND: "250 2.1.5 OK z11-20020aa79e4b000000b0056c0d129edfsm9395132pfq.121 - gsmtp"
    [21-Nov-2022 19:33:10 America/Los_Angeles] SERVER -> CLIENT: 250 2.1.5 OK z11-20020aa79e4b000000b0056c0d129edfsm9395132pfq.121 - gsmtp
    
    [21-Nov-2022 19:33:10 America/Los_Angeles] CLIENT -> SERVER: RCPT TO:<asstAdminName@somewhere.com>
    
    [21-Nov-2022 19:33:10 America/Los_Angeles] SMTP INBOUND: "250 2.1.5 OK z11-20020aa79e4b000000b0056c0d129edfsm9395132pfq.121 - gsmtp"
    [21-Nov-2022 19:33:10 America/Los_Angeles] SERVER -> CLIENT: 250 2.1.5 OK z11-20020aa79e4b000000b0056c0d129edfsm9395132pfq.121 - gsmtp
    
    [21-Nov-2022 19:33:10 America/Los_Angeles] CLIENT -> SERVER: RCPT TO:<storeMainAdminName@storeDomain.com>
    

    The asstAdminName did receive their copy of the customer's email. The storeMainAdminName did not - I have not yet positively identified the culprit.

    Note: I am experimenting with customers who have as an email address the same domain as the store: that is, instead of <[email protected]>, all my customers have <[email protected]>. However, as such, that may pose a problem for me in trying to solve this - a situation that has nothing to do with CubeCart, but with the hosting provider for my domain name (currently, Havenswift).

     

     

  10. I see it now.

    According to:

    https://schema.org/OfferItemCondition

    the four recognized conditions are:

    So, I think you have a choice:

    Create a custom product condition column in the database, use that to show to customers, and have the standard set of conditions provided by CubeCart for this markup file.

    Or, if this schema property is not required for Product > Offer, remove it from the markup file.

    Or, hard-code the {$PRODUCT.condition|ucfirst} variable to say Used in the markup file.

    Also, see:

    https://forums.cubecart.com/topic/52014-resolved-product-condition-changes/
    https://forums.cubecart.com/topic/56533-condition-options/

     

  11. The first critical issue is not something I have seen before. I am guessing the context is that you have an add-on where customers can make offers on your inventory, and a new database table has been created ('offers') to log them. That database table has a column ('itemCondition' - which is not a CubeCart naming format) that has been coded to hold only a few specific words - anything else is not valid.

    If all of the above is the case, then a conversation with the publisher of the add-on will be required.

    But then, I am not following the "structured data" code in the templates, and how CubeCart populates that data.

  12. No POST section in debug when attempting to log in..... Soooo weird!

    I've never really had an issue with cookies - they are critical at maintaining session continuity just like any other site - except when a new server was unknowingly deleting session files every half-hour causing me to become logged out for no apparent reason (not the browser's fault).

     

  13. Please be aware that there may be two distinct parts to the Debug section. The second part, if present, starts after the SQL queries and "Page Load Time" of the first part.

    There has to be a POST: section - especially for the browser that the login succeeds. That's where the username and password values are to be found.

    But for Chrome to report that there are undefined indexes USERNAME and PASSWORD certainly suggests that the Chrome browser is not sending any POST.

    Do you have a password manager addon auto-filling login forms (such as Dashlane)?

    Earlier in this conversation, I suggested using the browser's Developer Tools. Have you explored the traffic on the tools' Network tab?

  14. Let's try this:

    Log in (apparently using Firefox). In Store Settings, Advanced tab, enable Debug mode and enter your local IP address in the next field (www.showmyip.com). (This allows only you to see the debug info.)

    Log out, then use Chrome to (try to) log in. When you get the log in screen after that attempt, view the debug info at the bottom of the page.

    You should see:
    
    Debug Output
    This can be disabled via "Store Settings" » "Advanced" (Tab) » "Enable Debugging".
    PHP:
    [USERNotice] /xxx/classes/admin.class.php:438 - Possible Phishing attack - Redirection to
    'http://www.zzz.com/admin.php?_g=login' is not allowed. Please check the value of 'Store URL'
    in the SSL section of your store settings.
    GET:
    'Before Sanitise:' =>
    'After Sanitise:' =>
    POST:
    'username' => user
    'password' => pass
    'redir' => http://www.zzz.com/admin.php?_g=login
    'login' => Log In
    'token' => 32 character hash

    Then, there will be another, second debug section but probably will not contain anything of interest. But examine it anyway.

    You should also compare what you see using Chrome against what you see using Firefox.

  15. That would certainly depend on the skin. I see that you are using the Crosshatch skin.

    I also see that the links to the documents are of the form:

    /index.php?_a=document&doc_id=3

    which CC6 generally replaces that with named URLs. So maybe you are using CubeCart 5?

    In the skin template main.php, there are two places that use the same results from the constructed {$SITE_DOCS} variable.

    To change the one but not the other, we need to replace the one variable with the HTML code used to construct that variable, making a change to exclude a specific element of the array.

    In main.php, near line 43, find (yours may not be exactly this):
    
    {$SEARCH_FORM} {$SITE_DOCS}
    
    Change to:
    
    {$SEARCH_FORM}
    <ul class="documents">
    {if isset($DOCUMENTS) && count($DOCUMENTS) > 0} {foreach from=$DOCUMENTS item=document}{if $document.doc_id eq 3}{* skip T&C's *}{continue}{/if}
    	<li><a href="{$document.doc_url}" title="{$document.doc_name}" {if $document.doc_url_openin}target="_blank" {/if}>{$document.doc_name}</a></li>
    {/foreach} {/if} {if isset($CONTACT_URL)}
    	<li><a href="{$CONTACT_URL}" title="{$LANG.documents.document_contact}">{$LANG.documents.document_contact}</a></li>
    {/if}
    </ul>

    You may need to have CubeCart clear its internal cache.

  16. As an experiment, in admin, Store Settings, Layout tab, Skin Settings section, "Allow users to change front-end skin?", select Yes (Logged in admins only). Also, on the Features tab, Mailing List section, "Enable exit modal newsletter signup", make that unchecked -- assuming that the SFWS skin isn't doing this on its own. Save the changed settings and have CubeCart clear its internal cache.

    Then, as a logged in admin, you should see at the bottom of the screen a means to select the standard Foundation skin. (Non-admins will not be able to switch to any other skin.)

    Please determine if the anomaly still appears using the standard Foundation skin.

     

  17. I can say that on my Win7 laptop, Internet Explorer 11 properly adds items to the basket, and properly displays the results in the basket fade-in/out window.

    (I thought I had Chrome, but I must have removed it at some point in the past.)

    Let's use the browser's Developer Tools. The Tools are usually activated by F12. There will be a Network tab to see what is requested and what is returned.

    Have that ready to view when you click the Add to Basket button.

    Add a product to the basket (I added from the Latest Products on the Homepage). On the Network tab of the Developer Tools, highlight the /cucashop/?_g=ajaxadd POST line. Examine the details of the request and response.

    The request will be something like:
    quantity=1&add=156&token=#hashcode#
    
    The response will start with:
    <div id="mini-basket">

    The response is actually the contents of the skin template: box.basket.php.

  18. Certainly if the Security Certificate knows only shop. but not shop2., then there will be problems.

    I think if the config settings got carried over and shop2 thinks SSL should always be enabled, then there will be a bounce to https, which, if the web server has only shop listening on port 443, then shop it will be.

    Get the admin login page in the browser.

    Then, make sure the login page is for shop2, and not https. If it is https, there may be a padlock that when clicked, the administration might proceed as non-https.

    But before you actually click to log in, use the browser's Developer Tools. The Tools are usually activated by F12. There will be a Network tab to see what is requested and what is returned.

    Have that in view when you click the Login button.

    You will see if there are any bounces and to where.

     

×
×
  • Create New...