Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by bsmither

  1. CubeCart has three methods to ask the database on how to formulate a query: Fulltext Relevance - if nothing found, then REGEX on word boundaries - if nothing found, then REGEX anywhere - if nothing found, then say "No products found." Fulltext Relevance is a somewhat complicated method to explain. Basically, if too few results are returned, the term(s) must not be all that important. If too many results, then the term(s) must not be all that unique. There are nuances. Word boundaries will find whole words. 'TAR' will find "TAR 735" but not "TAR735". Anywhere will find the sequence of characters in "TAR", "TAR367", "STAR-BRIGHT", etc. By looking at the list of SQL queries in the debug section, it can be determined which method CubeCart finally used: whether there are one, two, or three search queries. Several store owners have edited the searchCatalogue() function definition so that the default method is $search_mode = 'rlike', skipping the 'fulltext' method.
  2. Literally, the change involves replacing a digit (1) with the name of a variable ($page). This edit cannot have caused a white screen. Depending on the text editor used, the editor may be doubling the line endings, making the file double spaced. Thus, line 1941 becomes 3882. Do you recall seeing double spacing in the editor you used?
  3. FYI: I now completely understand the nature of this scenario. I was able to reproduce it and have traced the code where the mistake is being made. I am working on a solution: so that this doesn't happen in the future, and to create a 'fix-it' code snippet to solve all existing shopping baskets that suffer this situation.
  4. Please try this edit. In /classes/catalogue.class.php: The line numbers may be slightly different... Lines 1941-1943, find: } elseif ($search_mode == 'fulltext') { return $this->searchCatalogue($original_search_data, 1, $per_page, 'rlike'); } Change to: } elseif ($search_mode == 'fulltext') { return $this->searchCatalogue($original_search_data, $page, $per_page, 'rlike'); } Lines 1998-2000, find: } elseif ($search_mode=="rlike") { return $this->searchCatalogue($original_search_data, 1, $per_page, 'like'); } Change to: } elseif ($search_mode=="rlike") { return $this->searchCatalogue($original_search_data, $page, $per_page, 'like'); }
  5. Searching BPM. I see that the web address indicates that page=2 has been requested, but yes, the twelve results are the same as shown on page 1. Clearing CubeCart's internal cache had no effect. Asking for a sorted list (Price Low-High) got the twelve lowest priced products. Page=2 got the same products. I had a suspicion that the database is resisting in some fashion having to search on a three or less letter search term. The term UNF seems to work, but GRN has only one row returned in the resultset. GRN1 has 12 in the predicted search popover but shows only the two products where "GRN1" is the actual product code. So, I cannot see that there is a fault in the building of the query - specifically calculating the solution to 'per-page' multiplied by 'page-1'. (That is, for page=2: 12x1=starting at the 12th row in the resultset for 12 rows.) There must be a fault in the construction of the wildcards used in the REGEX query sent to the database. Examining the queries that CubeCart sends to the database would be helpful. In admin, Store Settings, Advanced tab, enable Debug Mode. Enter your local IP address in the following text field (www.showmyip.com). Save. Search for BPM. Go to page=2. At the bottom of the screen will be some diagnostic info. Specifically, all the queries sent to the database. Copy and Paste that list of queries into a Private Message to me.
  6. In the PayPal Commerce plugin, there is a hook file named 'controller.index.php'. This hook code creates and registers a Smarty output filter. (An output filter can add, edit, and delete content from rendered sources, usually skin templates.) I assume this output filter is required for displaying PayPal stuff on the PayPal skin template when checking out, but the Smarty output filter also seems to be applied to any and all rendered templates universally, including email templates (the HTML component only). Then, the MailScanner utility catches the email, sees the <script> tag, and disarms it. The result is visible text. CubeCart's email templates do not have the target of the javascript generated by this hook, so it's not necessary. But, as an output filter that is instantiated at 'controller.index', the action this hook provides will get applied to unintended content. Resolving this will require the CubeCart programmers to come up with a solution: possibly testing for what will be using the output filter, or using different hooks. As for MailScanner, according to the documentation posted above, it is unfortunate that there is no choice to 'remove' script tags and the inner content.
  7. When you "click to the next page", do you actually get a new page, with the CubeCart header, sidebars, footer, but an empty main content area? Or is it a just a completely blank white screen? Or when you say "nothing happens" and "does nothing", are you saying that when clicking on the link, there was no effort by the browser to issue a request for a new page? Please remind us of the web address for the site.
  8. Please edit the Mobile skin template content.orders.php: Near line 34, find: <div><label for="lookup_order_id">{$LANG.basket.order_number}</label><span><input type="text" id="lookup_order_id" name="cart_order_id" value="" /></span></div> Change to: <div><label for="lookup_order_id">{$LANG.basket.order_number}</label><span><input type="text" id="lookup_order_id" name="cart_order_id" value="{$ORDER_NUMBER}" /></span></div>
  9. You said (post #3): "It's always passed when I try to recreate the issue." Also, "If I add an item to the basket that doesn't yet contain a matrix entry, then go back and create a matrix entry, this matrix entry is never populated in the basket." So, there exists the frequent scenario whereby a product has been made available for purchase, but has yet to have its Options Matrix table data fully populated (missing product codes). And that product has been put in shopping baskets, but the order has not yet been transacted. Having looked at the sequence of events during checkout, I recall where all the products are 'verified'. I'll see if, during this verification of the contents, the product code is included.
  10. This is found in an email received by the customer? It looks like javascript that would be found in the PayPal plugin module. If possible, look at the plain text component of the received email. (Granted, that might be a feature of the email program you use that simply isn't available.) If not, you should be able to look at the email's raw source. Does the rogue content also appear in the plain text component?
  11. Regarding #2, I would think that the content.category.php template has been edited such that the list of sub-cats do not collapse into a toggled slide-open from the category title. Regardless, in the template file content.category.php, find: {if isset($SUBCATS) && $SUBCATS} <div class="collapse" id="collapseSubCats"> Just ABOVE that, add: {if isset($SUBCATS) && $SUBCATS} <div class="panel panel-basix"> <div class="panel-body"> <div class="row"> {foreach from=$SUBCATS item=subcat} <div class="product-box"> <div class="inner"> <div class="product-wrap"> <div class="photo-wrap"> <a class="th" href="{$subcat.url}" title="{$subcat.cat_name}"> <img class="thmb" src="{$subcat.cat_image}" alt="{$subcat.cat_name}"> </a> </div> <div class="product-name"><a href="{$subcat.url}" title="{$subcat.cat_name}">{$subcat.cat_name}</a></div> </div> </div> </div> {/foreach} </div> </div> </div> {/if} Then, near the bottom, find: {else} <div class="alert alert-danger text-center">{$LANG.category.no_products}</div> Just below that: Delete: {if isset($SUBCATS) && $SUBCATS} <div class="clear"> <div class="list-group"> {foreach from=$SUBCATS item=subcat} <a href="{$subcat.url}" class="list-group-item" title="{$subcat.cat_name}">{$subcat.cat_name}</a> {/foreach} </div> </div> {/if} The panels are wide enough to get four panels per row. (Same as the array of panels on the Homepage.) The image, however, may be too small. If not happy with the size of the sub-cat images, then in the skin's config.xml file: Find: <image reference="subcategory" maximum="105" quality="80" default="noimage.png" /> Change to: <image reference="subcategory" maximum="150" quality="80" default="noimage.png" /> Then have CubeCart clear its internal cache.
  12. "It removed both versions of the thumbnail images." Hmm! I will want to investigate this.
  13. "Opening each and every order, just to check if the matrix was populated isn't practical." Your personal experiments could not reproduce an item's purchase that had the wrong product code -- provided the options matrix's product code was available at the time the item was put in the basket. Therefore, we can assume that, from this point forward, an inventory item will always have such product codes entered before it is allowed to be purchased. I did find that in the CubeCart_order_summary table, 'basket' column, the value becomes stale fairly soon. That is, changes a customer makes to an order after a certain point does not change this value, but I'm not sure when this happens. And any admin edits to the order does not change this value. (Admin edits to an order apparently fetches and changes the respective rows in CubeCart_order_inventory.)
  14. Looking more closely at the email template for Cart: Order Confirmation and Admin: Order Received, I find that the HTML content does not contain a placeholder (aka, macro) for the Product Code, however, the Plain Text content does. When the admin prints an Order Summary (shipping list), there is a Product Code printed. So, as you assert, our best guess is that when that item was placed in the basket, the best Product Code available - in this case, for the base product - was used. My experiments show that opening the order for editing, Overview tab, check that the target line item has the desired product code. If not, try to simply Save & Reload. If the product code did not change, then on the Inventory tab, change the option shown to any other available option. Save & Reload. Change the changed option back to the original option. Save & Reload. Back on the Overview tab, verify that the target line item has the desired product code. (Then have CubeCart clear its internal cache.)
  15. There is mention of a backward incompatibility with PHP8 vs PHP7: "Attempting to read a property of a non-object." We can assume similar incompatibilities with respect to writing, as well as using the 'property accessor' operator to work with arrays. So, the following edits is an experiment that uses array index syntax: In the SagePay module, gateway.class.php file: Near lines 119 and 120, find: $resultArray[$i]->start = $start; $resultArray[$i]->token = $Tokens[$i]; Change to: $resultArray[$i]['start'] = $start; $resultArray[$i]['token'] = $Tokens[$i]; Near line 129, find: $valueStart = $resultArray[$i]->start + strlen($resultArray[$i]->token) + 1; Change to: $valueStart = $resultArray[$i]['start'] + strlen($resultArray[$i]['token']) + 1; Near line 132, find: $output[$resultArray[$i]->token] = substr($thisString, $valueStart); Change to: $output[$resultArray[$i]['token']] = substr($thisString, $valueStart); Near lines 134 and 135, find: $valueLength = $resultArray[$i+1]->start - $resultArray[$i]->start - strlen($resultArray[$i]->token) - 2; $output[$resultArray[$i]->token] = substr($thisString, $valueStart, $valueLength); Change to: $valueLength = $resultArray[$i+1]['start'] - $resultArray[$i]['start'] - strlen($resultArray[$i]['token']) - 2; $output[$resultArray[$i]['token']] = substr($thisString, $valueStart, $valueLength);
  16. Please do that. Also, in admin, Images, click the Update File List tab. This should remove references ('file_id' values in CubeCat_filemanager) to these now deleted rows from the CubeCart_image_index table (I hope).
  17. You can fix the immediate need to have a custom Product Name as part of the order details. In admin, Orders, bring the order up for editing. On the Inventory tab, hover the mouse cursor over the product name and click once. There will then display a text entry field. Enter whatever you want -- a specific Product Code, a different Product Name, whatever. Save. However, as the Product Code is generally available to skin templates and email templates, I think the Product Name along with annotations of the chosen options is what is mostly used. Have you made changes to the email templates to show the Product Code?
  18. From what I see in the code of the /skin/admin/index.tpl file, the Save button will appear if and only if the PayPal Commerce module is currently, successfully "connected" to PayPal. From another conversation by you, it seems getting "connected" is a problem. So, I would say that once the PayPal Commerce module gets "connected", then the Save button will appear.
  19. If the "Busy" icon (called a 'throbber') appears and won't go away (there is a default timeout for ajax requests), it might be the case where javascript has crashed. To see if this has happened, your browser will have a Developer's Tools feature. In these tools is a panel named "Console". The Console will list problems with CSS, page resource requests, coding problems with javascript, etc. Is there anything relevant listed in the Console tab of the Developer's Tools feature of your browser? (F12 is usually a keyboard shortcut to get to the tools.)
  20. The "Allowed Zones" screen is found when working with an extension (shipping, gateway, plugin, etc). It is the Allowed Zones tab. This "Allowed Zones" tab/screen is a standard tab found in almost all extensions. When viewing this screen, what is the last part of the web address showing in the browser's Address Bar? It will look like: ?_g=plugins&type=shipping&module=Free_Shipping
  21. Are you referring to the All-in-One-Shipping module? If so, I see a Save button. Are you referring to admin, Countries/Zones, Add Zone tab? I see a Save button here.
  22. Did you just upgrade to CC646? If so, a fix is available that has been implemented in CC647. https://github.com/cubecart/v6/issues/3045 Oops. Misread the problem.
  23. A few conditions must exist: the person viewing (does not need to be logged in as a customer) the storefront must not be logged in as an admin (using the same browser which then shares a session cookie), the "Hide-out-of-stock" general setting must be checked, the product must have the "Use Stock Level" checked and have a stock level of zero, and possibly "Allow out-of-stock purchases" general setting must be unchecked. Then have CubeCart clear its internal cache. From what version of CubeCart did you upgrade from, where the Hide out-of-stock setting worked last?
  24. Yes. Perhaps the data for these products was brought in via a CSV import? (I am still tracing the code to discern where there could be a missing check for proper formatting of an image's filepath when adding images in admin's Images screens.) If the database table is shown sorted by 'filename', are there pairs of rows for the same image?
  25. Of the four images, half have a URL of /images/cache/products/ and the other half have a URL of /images/cache//products/. Note the double-slash. This list is assigned to the template array variable $GALLERY in the core code. I am not yet sure how to fix this. Using an external database utility (phpMyAdmin in the control panel of your hosting account, for example), look in CubeCart_filemanager. You may find rows where the values in the 'path' column have a leading slash. A leading slash is not proper. I do not (yet) know if a folder with a leading slash will show in the admin's Add/Edit Product, Images tab file-picker.
  • Create New...