Jump to content

bsmither

Member
  • Posts

    17,989
  • Joined

  • Last visited

  • Days Won

    603

Everything posted by bsmither

  1. It is an easy edit, but won't survive an upgrade (as the Foundation skin skin gets replaced in its entirety). So, keep these notes. In the template element.product.horizontal_gallery.php: Find: <div class="small-5 medium-7 columns horizontal"> Change to: <div class="small-12 medium-7 columns horizontal"> Find: <div class="small-7 medium-5 columns"> Change to: <div class="small-12 medium-5 columns thickpad-left"> In the template element.product.vertical_gallery.php: Find: <div class="small-5 medium-{if is_array($GALLERY) && count($GALLERY) > 1}6{else}7{/if} columns text-center nopad"> Change to: <div class="small-12 medium-{if is_array($GALLERY) && count($GALLERY) > 1}6{else}7{/if} columns text-center nopad"> Find: <div class="small-7 medium-5 columns thinpad-left"> Change to: <div class="small-12 medium-5 columns thickpad-left"> The skin uses either the horizontal or vertical gallery template, but the edit was applied to both just to be complete.
  2. In the templates element.product.vertical.gallery.php (and horizontal), there is this (simplified): <ul class="clearing-thumbs data-clearing> <li> <a> <img data-caption="{$PRODUCT.name}{if !empty($image.description)}: {/if}{$image.description}"> The caption will use the product name, and if there is a 'description' for the image, that will be appended. Unfortunately, the FileManager Image Edit Details screen in admin has no text entry field for a description. (I will post an issue in the Github.) If the image 'title' is what you want to append to the product name: Change: data-caption="{$PRODUCT.name}{if !empty($image.description)}: {/if}{$image.description}" To: data-caption="{$PRODUCT.name}{if !empty($image.image_tags.title)}: {/if}{$image.image_tags.title}" If the image 'title' is what you want to replace the product name: Change: data-caption="{$PRODUCT.name}{if !empty($image.description)}: {/if}{$image.description}" To: data-caption="{if !empty($image.image_tags.title)}{$image.image_tags.title}{else}{$PRODUCT.name}{/if}"
  3. In your hosted control panel, you should have a group of settings that define what specific version of PHP you want your hosted environment to run under, as well as what PHP extensions you want to have installed - such as a "mysqli" database extension that lets PHP talk to a database. There will be a dozen or two extensions you can enable for your environment for PHP to use. Choose to enable the ZIP and MB_String extensions.
  4. For Foundation (which will get all new files when CubeCart gets upgraded), make these edits: In the template content.product.php, near line 30, from: <dd><a href="#product_spec">{$LANG.common.specification}</a></dd> To: {* <dd><a href="#product_spec">{$LANG.common.specification}</a></dd> *} Near line 48, from: <div class="content{if empty($PRODUCT.description)} active{/if}" id="product_spec"> To: {* <div class="content{if empty($PRODUCT.description)} active{/if}" id="product_spec"> Near line 103, from: </div> To: </div> *}
  5. If the error is from the web server, and is sent even before the web server starts running PHP to execute CubeCart, there is nothing that can be added to CubeCart to report any diagnostic data. There must be a web server error log somewhere. If it cannot be found in your hosted account's control panel, contact your hosting provider.
  6. We believe the error response is a false-negative. In the table of currencies, there is a column for "Last Updated". Does the date shown here reflect when you last fetched the rates?
  7. In admin, Error Log, System Error Log tab, take note if there are any entries that mention ECB Exchange Rates. In admin, Request Log, take note of any entries of: Request Sent (cURL) - https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml If all is good, there should be a Response received (200 - OK), followed by the actual response - an XML string.
  8. In the file /includes/functions.inc.php, there is the function offline(). In this function, HTTP headers are set for a 503 response, if the store is offline. Note that this function is only called when starting up the storefront - not the admin backend. We will make this check: From: header('HTTP/1.1 503 Service Temporarily Unavailable'); header('Status: 503 Service Temporarily Unavailable'); header('Retry-After: 3600'); To: header('HTTP/1.1 503 Our Store is temporarily unavailable'); header('Status: 503 Our Store is temporarily unavailable'); header('Retry-After: 3600'); Now, after logging in and, by default, wanting to show the dashboard, if the browser shows this changed message, we will start looking here.
  9. Please rename the existing (seems it was implemented to stop rogue customer account creations) to something else, re-name the '-stopped' file to what it should be.
  10. Ask your hosting provider if there is any firewall preventing your host account from sending out any PHP-initiated requests for data. Such requests may be from www.cubecart.com, forums.cubecart.com, and www.google.com. Also, there must be a web server error log, somewhere. If the web server issues a 503, the reason for it will get logged.
  11. Hopefully, there will be something in PHP's error_log. https://forums.cubecart.com/topic/51550-how-to-create-the-error-log/ Please review this issue in the Github. Does any of it resemble your situation? https://github.com/cubecart/v6/issues/3155
  12. Please examine the file /includes/global.inc.php. There you will find the current name of the adminFile script file. The web address for the administration backend would be: https://www.example.com/admin_aBcDeF.php (where aBcDeF is a series of random letters)
  13. In the setup folder, /db/upgrade/ contains a set of upgrade SQL statement files. You can use CubeCart's admin, Maintenance, Query Database (Advanced) tab to enter each SQL command, but there will be no result displayed. Otherwise, you will need to use an external database utility to execute these SQL statements. After doing all the statements in these command files (if needed, check for existing structure) starting with 6.4.6.sql, you will then add a row to CubeCart_history indicating the version and time the upgrade to the database was made. Also in the setup folder, the /scripts/ folder has files that will massage the data to work with the respective version of CubeCart. For example, 6.4.6.php has code that updates the configuration to use PHP's date() code characters. Look in your hosting account's control panel, find a possible PHP error_log. It may show what is causing the upgrade to stall. If PHP's error_log file cannot be found, see: https://forums.cubecart.com/topic/51550-how-to-create-the-error-log/
  14. The most recent versions of CubeCart uses PHP's date() function, whereas earlier versions used PHP's strftime() function - which is deprecated and will be removed from a future version of PHP. The date() function uses straight characters while the strftime() function uses percent-characters. In admin, Store Settings, Advanced tab, use the following for the date formats: Fuzzy Time Format= H:i Date & Time Format= d M Y, H:i Dispatch Date Format= M d Y
  15. Please review these conversations: https://forums.cubecart.com/topic/55368-adding-link-from-documents-page-into-the-category-bar/ https://forums.cubecart.com/topic/50449-top-nav-menu/
  16. If the single folder, which came from the unzipped file, was placed in /modules, please move that folder to /modules/shipping.
  17. I found it to be easier to specify a specific date. In /classes/gui.class.php: Near lines 1299-1302, find: } else { $vars = 'none'; } foreach ($GLOBALS['hooks']->load('class.gui.display_popular_products') as $hook) { Change to: } foreach ($GLOBALS['hooks']->load('class.gui.display_popular_products') as $hook) { Near lines 1269-1271, find: if ($products) { $vars = array(); foreach ($products as $product) { Change to: $vars = array(); if ($products) { foreach ($products as $product) { Near lines 1265-1266, find: default: // view-based $where = $GLOBALS['catalogue']->outOfStockWhere(array('status' => '1')); Change to: default: // view-based $where = $GLOBALS['catalogue']->outOfStockWhere(array('status' => '1', 'date_added' => ">".$since)); Near line 1262, find: $query = "SELECT `oi`.`product_id`, `i`.`name`, `i`.`price`, `i`.`sale_price`, `i`.`tax_type`, `i`.`tax_inclusive`, SUM(`oi`.`quantity`) as `quantity` FROM `".$GLOBALS['config']->get('config', 'dbprefix')."CubeCart_order_inventory` as `oi` JOIN `".$GLOBALS['config']->get('config', 'dbprefix')."CubeCart_inventory` as `i` WHERE `oi`.`product_id` = `i`.`product_id` AND `i`.`status` = 1 $whereStr GROUP BY `oi`.`product_id` ORDER BY `quantity` DESC LIMIT ".$limit.";"; Change to: $query = "SELECT `oi`.`product_id`, `i`.`name`, `i`.`price`, `i`.`sale_price`, `i`.`tax_type`, `i`.`tax_inclusive`, SUM(`oi`.`quantity`) as `quantity` FROM `".$GLOBALS['config']->get('config', 'dbprefix')."CubeCart_order_inventory` as `oi` JOIN `".$GLOBALS['config']->get('config', 'dbprefix')."CubeCart_inventory` as `i` WHERE `oi`.`product_id` = `i`.`product_id` AND `i`.`status` = 1 AND `i`.`date_added` > '$since' $whereStr GROUP BY `oi`.`product_id` ORDER BY `quantity` DESC LIMIT ".$limit.";"; Near lines 1258-1259, find: $limit = (is_numeric($GLOBALS['config']->get('config', 'catalogue_popular_products_count'))) ? $GLOBALS['config']->get('config', 'catalogue_popular_products_count') : 10; switch ((int)$GLOBALS['config']->get('config', 'catalogue_popular_products_source')) { Change to: $limit = (is_numeric($GLOBALS['config']->get('config', 'catalogue_popular_products_count'))) ? $GLOBALS['config']->get('config', 'catalogue_popular_products_count') : 10; $since = (!empty($GLOBALS['config']->get('config', 'catalogue_popular_products_since'))) ? $GLOBALS['config']->get('config', 'catalogue_popular_products_since') : "0000-00-00"; switch ((int)$GLOBALS['config']->get('config', 'catalogue_popular_products_source')) { In the admin template settings.index.php: Near lines 249-251, find: <div><label for="catalogue_popular_products_source">{$LANG.settings.product_popular_source}</label><span><select name="config[catalogue_popular_products_source]" id="catalogue_popular_products_source" class="textbox"> {foreach from=$OPT_CATALOGUE_POPULAR_PRODUCTS_SOURCE item=option}<option value="{$option.value}"{$option.selected}>{$option.title}</option>{/foreach} </select></span> Change to: <div><label for="catalogue_popular_products_source">{$LANG.settings.product_popular_source}, since</label><span><select name="config[catalogue_popular_products_source]" id="catalogue_popular_products_source" class="textbox"> {foreach from=$OPT_CATALOGUE_POPULAR_PRODUCTS_SOURCE item=option}<option value="{$option.value}"{$option.selected}>{$option.title}</option>{/foreach} </select><input name="config[catalogue_popular_products_since]" id="catalogue_popular_products_since" class="textbox number" value="{$CONFIG.catalogue_popular_products_since}" placeholder="YYYY-MM-DD"></span>
  18. You are getting the address items from the admin, Order Summary page? If so, try the following: In the admin /sources/orders.index.inc.php: Near line 419, find: $overview_summary['country'] = is_numeric($overview_summary['country']) ? getCountryFormat($overview_summary['country'], 'numcode', 'name') : $overview_summary['country']; After that, add: $overview_summary['state_abbrev_d'] = is_numeric($overview_summary['state_d']) ? getStateFormat($overview_summary['state_d'], 'id', 'abbrev') : $overview_summary['state_d']; $overview_summary['state_abbrev'] = is_numeric($overview_summary['state']) ? getStateFormat($overview_summary['state'], 'id', 'abbrev') : $overview_summary['state']; In the admin template orders.index.php: Near lines 163-164, from: {$OVERVIEW_SUMMARY.town_d|upper}<br> {if !empty($OVERVIEW_SUMMARY.state_d)}{$OVERVIEW_SUMMARY.state_d|upper}, {/if}{$OVERVIEW_SUMMARY.postcode_d}<br> To: {$OVERVIEW_SUMMARY.town_d|upper}&nbsp; {if !empty($OVERVIEW_SUMMARY.state_abbrev_d)}{$OVERVIEW_SUMMARY.state_abbrev_d|upper}, {/if}{$OVERVIEW_SUMMARY.postcode_d}<br> Near lines 174-175, from: {$OVERVIEW_SUMMARY.town|upper}<br> {if !empty($OVERVIEW_SUMMARY.state)}{$OVERVIEW_SUMMARY.state|upper}, {/if}{$OVERVIEW_SUMMARY.postcode}<br> To: {$OVERVIEW_SUMMARY.town|upper}&nbsp; {if !empty($OVERVIEW_SUMMARY.state_abbrev)}{$OVERVIEW_SUMMARY.state_abbrev|upper}, {/if}{$OVERVIEW_SUMMARY.postcode}<br>
  19. Nice idea! In admin, Maintenance, Rebuild tab, there is a means to "Reset all product view counts". "Views" is one of the choices on what criteria to base a query for "Best Sellers" (aka Popular Products). But resetting Views might be overkill for some. I have in mind a text box next to Store Settings, Layout tab, "Source data for popular products" saying, "Within the past [###] days." This won't be a date range, but will this suffice for your needs?
  20. In the snippet: From: if($_GET['_g'] == 'orders' && (!isset($_GET['node']) || $_GET['node'] == 'index') && isset($_GET['action']) && in_array($_GET['action'], array('add','edit'))) { To: if(isset($_GET['_g']) && $_GET['_g'] == 'orders' && (!isset($_GET['node']) || $_GET['node'] == 'index') && isset($_GET['action']) && in_array($_GET['action'], array('add','edit'))) { In /classes/gui.class.php, near line 1315, in the function _displayRandomProduct(): From: foreach ($GLOBALS['hooks']->load('class.gui.display_random_product_pre') as $hook) { include $hook; } $featured_products = $GLOBALS['db']->select('CubeCart_inventory', 'product_id', $GLOBALS['catalogue']->outOfStockWhere(array('status' => '1', 'featured' => '1'))); $n = ($featured_products ? count($featured_products) : 0); if ($n > 0) { $random_product = false; To: $random_product = false; foreach ($GLOBALS['hooks']->load('class.gui.display_random_product_pre') as $hook) { include $hook; } $featured_products = $GLOBALS['db']->select('CubeCart_inventory', 'product_id', $GLOBALS['catalogue']->outOfStockWhere(array('status' => '1', 'featured' => '1'))); $n = ($featured_products ? count($featured_products) : 0); if ($n > 0) { In /classes/session.class.php, near line 676: From: return strpos(($_SERVER['HTTP_USER_AGENT']), 'Trident') ? 'IEX' : htmlspecialchars($_SERVER['HTTP_USER_AGENT']); To: return strpos(($_SERVER['HTTP_USER_AGENT']??"fullsize"), 'Trident') ? 'IEX' : htmlspecialchars($_SERVER['HTTP_USER_AGENT']??"fullsize"); In /classes/ssl.class.php, near line 39: From: if ($GLOBALS['config']->get('config', 'ssl') && !ADMIN_CP && !CC_SSL && !in_array($_GET['_g'], $this->_ignored_pages)) { To: if ($GLOBALS['config']->get('config', 'ssl') && !ADMIN_CP && !CC_SSL && isset($_GET['_g']) && !in_array($_GET['_g'], $this->_ignored_pages)) { Warnings such as these will eventually all be found and re-coded to keep PHP8 from mentioning them.
  21. I posted an issue in the Github regarding the document details. Do you have any code snippets that allow for more options to sort columns in any of the tables (stock or custom) in admin?
  22. Only a couple of the above need to be looked at. Array to string conversion - database.class.php:178 involves building an html link from data related to sorting a table column. The cubecart.class.php:194,197 involves fetching document details and failing at it. Everything else is the product of a particular programming style and PHP8 being annoyingly stern. No doubt, each version will have many, many changes to keep PHP8 from complaining about "Undefined" stuff. Without doing a deep-dive into troubleshooting efforts, it cannot be known what data is causing the two specific errors noted earlier.
  23. Putting a "Send Email" option and the code to do it into the Bank Transfer module would be easy enough. However, let me suggest that you look at the Print Order Form module. It will hold the same information as regards your bank, offers the customer a window summarizing the order and how to pay for it, where that window can be printed out, and the module has an option to send off an email reminder.
  24. I added more to my post above. Please reload this forum page. There is no urgency in removing the debugging code. It does not affect how CubeCart runs.
  25. The safe mode is still true? Have CubeCart clear it's internal cache. (Although needing to do that, if that fixes it, is very strange.) This says the "Encoder" is now available to process PHP8.1 source code. https://blog.ioncube.com/2022/08/15/new-ioncube-encoder-12-release-php-8-1-support/ There must, therefore, be a loader (decoder) for PHP8.1. The Wizard can confirm it: https://www.ioncube.com/loaders.php
×
×
  • Create New...