Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by bsmither

  1. We will create a code snippet. When a customer logs in, CubeCart determines if that customer's "saved basket" should be reloaded into their "session". A "saved basket" is from the prior shopping visit where the customer has added items to their cart, then simply logged out (or the session expired). CubeCart maintains a "saved cart" for the customer automatically. Note: In CubeCart's determination, if the visitor has already placed some items in their shopping cart before logging in, then the prior "saved cart" is abandoned in favor of the new cart's contents. Just prior to loading the "saved cart" into the just-logged-in customer's "session", there is a hook we can use to have CubeCart scan through the databased "saved cart" and recalculate the "options identifier" of those products that have had options chosen. This will catch and correct those cases where the admin has added or changed the options of items that are incorporated into the Options Matrix Table after when customers have already placed those items in their shopping basket. In admin, Manage Hooks, Code Snippets tab, click Add Snippet. Below the list of existing snippets, fill in the form as follows: Enabled: checked Unique ID: [email protected]+ Execution Order: 5 Description: At login, will recalc options identifier code to align with currently chosen options. Trigger: class.cart.construct.pre Version: 1.0.0 Author: https://forums.cubecart.com/topic/58055-still-having-matrix-issues/ PHP Code: <?php if ($GLOBALS['user']->is() && ($saved_cart_result = $GLOBALS['db']->select('CubeCart_saved_cart', array('basket'), array('customer_id' => $GLOBALS['user']->getId()), false, false, false, false)) !== false) { $saved_cart_basket = unserialize($saved_cart_result[0]['basket']); foreach ($saved_cart_basket as $saved_basket_hash => $saved_basket_product_data) { if (!empty($saved_basket_product_data['options'])) { // Options are option_id => assign_id // Calculate new options_identifier. CubeCart deals with new 'cached_name' and 'cached_array' $new_saved_cart_basket[$saved_basket_hash]['options_identifier'] = $GLOBALS['catalogue']->defineOptionsIdentifier($saved_basket_product_data['options']); } } // Merge the recalc'd options_identifier into the saved_cart_basket and save. $GLOBALS['session']->set('contents', merge_array($saved_cart_basket,$new_saved_cart_basket), 'basket', true); $saved_cart_result[0]['basket'] = serialize(merge_array($saved_cart_basket,$new_saved_cart_basket)); $GLOBALS['db']->update('CubeCart_saved_cart', array('basket' => $saved_cart_result[0]['basket']), array('customer_id' => $GLOBALS['user']->getId())); $this->load(); } Save the snippet. A "saved basket" for a customer is not available (as of CC647) for the admin to view directly. However, CubeCart allows the admin to "login as" a customer, but still, full details of the products in that customer's basket are not shown - specifically, the item's Product Code as given in the Options Matrix Table, as well as the options identifier code. There are about two ways to verify that the options identifier code has been added/updated. 1. In admin, Store Settings, Advanced tab, enable the Debug Mode and enter your local IP address in the next field (www.showmyip.com). View the storefront as the customer. At the bottom of the page, there will be one or two debug sections. The last section will have the Session:__basket['contents'] with each item's hash-key and details. 2. Look at the database directly, the CubeCart_saved_cart table for that customer_id.
  2. For you, as a customer, you can add a foreign address to your Address Book (e.g., Australia, Canada, whatever), then, during checkout, choose that as your delivery address. CubeCart should then ask the AIOS module to recalculate shipping charges based on the newly selected shipping zone. It might also help to have the AIOS module's Debugging temporarily set to Verbose. This will cause some output to appear at checkout which will describe the logic involved in what was used to calculate the shipping charges. Keep the debugging enabled for only as long as necessary because this report is viewable by everyone - not that it contains sensitive info, but because it is not a common thing to see.
  3. In admin, Store Settings, Features tab, Misc section, "Disable initial shipping & tax estimates" there is a checkbox to hide the link that exposes a small form to refine the delivery address. If you are logged in as a customer, the checkout pages should show a form asking for billing and delivery addresses if the customer has not already established addresses in their Address Book in their Profile pages. Where does your "UK 1st Class" shipping option come from? Does it come from a shipping module other than the All-in-One-Shipping module? In admin, Countries/Zones, please review all the countries you are willing to ship to has their status set as an Enabled option.
  4. CubeCart has had the feature where, at checkout, there is a link for non-signed-in customers ('guests') to specify a delivery address. (Needs to be enabled in admin, Store Settings.) Until CubeCart has a customer-specified delivery address, it will use the store's address as a 'best guess' delivery address. (So, I assume your store is in the UK?)
  5. These web addresses are for your admin backend. This area is NOT for public access. But this web address: https://empaust.com.au/?_a=product&product_id=1215 gets me the page for "Fire Strike Goggles Helmet Straps". So, no problem with accessing data from the database. Your web browser will have a feature called a "Developers Toolkit". It is usually activated by pressing the F12 key. Once showing the toolkit, the Network screen will show you what was requested and what the web server sent back. (For the storefront, there seems to be a couple of missing or wrongly-named image files for the Kurouto grey theme.) In admin, Error Log, System Error Log tab, see if there are any relevant messages as to what may have caused the 404. With respect to CC646 (not CC644 but there should be no difference), asking to edit a product where there is no such product_id should just get you the standard Product Add/Edit screen with blank fields - not a web server's 404 response. (There is a difference between a web server's 404 response, which comes directly from the web server, and Cubecart's "Product, Category, Document 404 - Page Not Found". CubeCart's 404 has all the regular side panels, header, and footer areas.)
  6. May we have a web address for the product showing the 404?
  7. I would NOT apply the diff file to the filediff program. Guaranteed to result in a hot mess.
  8. If you can understand a difference report, see this file: Result-Foundation 644-647.zip
  9. Is there still an Edit icon (just to the left og the red Bin icon in the right-most column)? Have you chosen to use a custom Order Number syntax? (admin, Store Settings, Features tab, "Order Number Format") If so, have you checked the checkbox for "Apply format to all past orders"? If not, we need to make some pointed edits to the code to figure out where the data is getting lost.
  10. Please make the following change: {literal} <!-- Google tag (gtag.js) --> ... all the javascript code ... </script> {/literal} That is, surround the supplied code with Smarty's "Take this literally!" command. Otherwise, Smarty will try to interpret anything between braces as commands for itself.
  11. One of those folders will have a more current timestamp - as well as the likelyhood of two administration script files that start with admin (admin.php and admin_HASH.php). Please examine the contents of the file /includes/global.inc.php. The values for the variables of 'admin_folder' and 'admin_file' must be that of the latest folder and file. The latest-dated folder and file will most likely be the actual CC647 version of the code. Perhaps the latest-dated of the pair are the plainly-named versions. If so, you should update the values of the $glob variables for 'admin_file' and 'admin_folder' to be that of the plainly-named versions: 'admin' for the admin_folder and 'admin.php' for the admin script file. Then, the web address for calling the latest version will be www.example.com/admin.php.
  12. These are all Warnings (was Notices in PHP 7) that would not prevent a page from being delivered. You were able to log in as an admin? One of the errors in the file (regarding array_keys in dashboard.index.inc.php at line 311) suggests that you are not running CubeCart 6.4.7 -- at least the files in the folder admin_n6kWr4 are not the latest version. How folders on your site start with admin?
  13. Currently, no. But, CubeCart has the ability to respect a custom API call that a "cron job" would execute on schedule, as well as hooks that could be used every time that a web page is requested to update if a specified amount of time has elapsed since the last update.
  14. Configuring Mod Security is a server administrator's responsibility. As best I know, Mod Security is configurable on a per site basis. Therefore, it may be the case that your other website may (or may not) have Mod Security installed, and/or configured differently. We would encourage you to contact your hosting provider for assistance.
  15. Installing this shipping module will allow you to have whatever USPS gives, plus whatever the Free Shipping module gives (sets free shipping for over a set amount). https://www.cubecart.com/extensions/shipping-methods/free-shipping
  16. That's going to be very tricky. The order of the shipping module might be able to be brute-forced into a custom order (why are there two Liefer- und Zustelloptionen?), and AIOS allows for a custom order of the Zones. However, CubeCart then sorts each module's package of rates by price. Then also allows the 'default' to be one of three conditions: Cheapest, Cheapest>0, Costliest. So, no built-in way to specifically target a rate from amongst all the module's rate packages. Fortunately, there are hooks that could be used to re-scan all the packages, looking for the one 'master default' targeted rate -- provided that somehow the module's admin settings screens be modified to have a radio button to indicate this 'master default'. Why are there two Liefer- und Zustelloptionen?
  17. If intended to be so, please mention this support link is behind a support paywall.
  18. I have written two plugins that may get you this: adds a tab to a product's Edit screen in admin that shows all orders that has included this item, also an "export" button that allows the admin to download a Sales Report (CSV) of orders that filters for a specified item. If interested, send me a Private Message with your email address, and I will send them to you.
  19. "but now has this" Did you upgrade CubeCart recently? If so, from what to what version? Has anything else been customized? A language phrase?, a skin template?, an email template?
  20. Your browser may be keeping a copy of common.css, layout.css, and styles.php in its internal cache. On subsequent page-loads, the browser could be choosing to use the cached copy. You can see if this is happening by using the browser's Developer Tools, Network tab.
  21. 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. The first will be a query, if present, will have the word RELEVANCE in it, the second, if present, will have the word RLIKE in it, and the third, if present, will have the word LIKE in it. (There will also be several queries that have LIKE in them but searching against the CubeCart_manufacturers table. Ignore these.) There is a preliminary test that asks the database what is the minimum number of letters that the shortest search term must have. It will be this query: SHOW VARIABLES LIKE 'ft_min_word_len' The answer is usually 4. So, because at least one of the search terms is less than 4 characters, the RELEVANCE query won't be executed and you won't see it in the list of queries. Instead, CubeCart will skip that and go to RLIKE. Since TAR is a whole word, the search using RLIKE succeeds. Then, you remove the whole word TAR from the description, and now CubeCart uses LIKE which will find 'tar' as part of any word. I cannot explain why the results include obvious non-matches. However, the LIKE query is permitted to use the query cache. So, if there was a recent instance where the data for product_id 7817 (aka TR21-W) did include a word containing 'tar', then maybe we see this because of a cached recordset from an earlier search on 'tar'. We would have to explore your database directly.
  22. The Foundation Vertical Menu mentioned is for Foundation 6 -- not compatible with Foundation 5 that CubeCart uses. The JqueryUI example is intended to show the action - not the styling nor the content. I will play with it and figure out how to integrate it.
  23. Otherwise, we can try this: https://jqueryui.com/accordion/#collapsible
  24. If you are referring to modifying Foundation, then, as an example, you can see Dirty Butter's site (highly customized but still based on Foundation) on the WayBack Machine: https://web.archive.org/web/20190722090647/https://dirtybutter.com/plushcatalog/ I think she used SemperFi's "Vertical Navigation Box". (No longer available, commercially.) Or are you asking about doing this on your existing site?
  • Create New...