Jump to content

bsmither

Member
  • Posts

    18,013
  • Joined

  • Last visited

  • Days Won

    605

Posts posted by bsmither

  1. There are two immediate choices:

    • Re-code the skins to not show "View All" and implement the code that Foundation now uses for a drop-down selector.
    • Wait for a customization to the core code to deal with "?page=all"

    For the first, examine the bottom of Foundation's template content.catalogue.php and use the 'traditional' sub-template. Then make sure "cam-1" has the template element.category.pagination.traditional.php.

    Also, look at the bottom of Foundation's element.paginate.php and note that the code to show "View All" has been commented out.

    An issue has been posted in the Github:

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

     

  2. What is your "cam-1" skin based off of?

    If the code you are using is similar to CC5, then please know that CC6 (not sure what version) has changed that to expect a drop-down selector to force a limit on the number of products to show per page - instead of all of them.

    The "bug", so to speak, is that CC6 can no longer deal with 'page=all', but did not provide code to catch that should it happen.

  3. For #3, have you tried:

    Instead of:
    
    {if $PAGINATION}
    <div class="row text-right right">
       <div class="small-6 medium-12 large-12 columns show-for-medium-up thinpad-top"> {include file='templates/element.paginate.php'}  </div>
    </div>
    {/if}
    
    Use:
    
    {if $PAGINATION}
    <div class="row text-right right">
       <div class="small-6 medium-12 large-12 columns show-for-medium-up thinpad-top">{$PAGINATION}</div>
    </div>
    {/if}

     

  4. Ah! page=all means that {$page} is something that does not look like a number.

    It seems this problem should have been evident for many (probably all) versions of CC6.

    There have been no relevant changes to that template.

    I will explore some more.

  5. In the template "element.paginate.php", I am guessing the culprit is this line:

    Near line 19:
    
        {$params[$var_name] = $page-1}
    
    Try this:
    
        {$params[$var_name] = $page - 1}
    
    Also do the same for line 13 - put spaces on either side of the dash.

    You may need to have CubeCart clear its internal cache after this skin edit.

  6. For #6, please see:

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

    To fix this, make this edit:

    In /classes/gui.class.php, near lines 1305-1310, find:
    
                $GLOBALS['cache']->write($vars, $cache_id); // See #3026 and #3114
                $GLOBALS['smarty']->assign('POPULAR', $vars);
                $content = $GLOBALS['smarty']->fetch('templates/box.popular.php');
                $GLOBALS['smarty']->assign('POPULAR_PRODUCTS', $content);
          /*}*/
        }
    
    Make a comment of the first line:
    
             // $GLOBALS['cache']->write($vars, $cache_id); // See #3026 and #3114
                $GLOBALS['smarty']->assign('POPULAR', $vars);
                $content = $GLOBALS['smarty']->fetch('templates/box.popular.php');
                $GLOBALS['smarty']->assign('POPULAR_PRODUCTS', $content);
          /*}*/
        }

     

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

    View the storefront.

    Below the page of content, there will be a debug section showing all the database queries made. Find the query that looks like the following (line split apart for clarity):

    SELECT
      I.* 
      FROM `CubeCart_inventory` AS I 
      JOIN `CubeCart_category` AS C 
      ON C.cat_id=I.cat_id 
    
    AND C.`status`=1 
    AND I.status = '1' 
    AND I.latest = '1' 
    AND ((I.stock_level > 0 AND I.use_stock_level = 1) OR I.use_stock_level = 0)
    
    ORDER BY I.date_added DESC,
    I.product_id DESC
    LIMIT 100

    where the LIMIT is set in Store Settings, Layout tab, "Number of 'Latest Products' to display" setting.

    This query is constructed in the file /classes/cubecart.class.php, near line 100.

    So, the query does use the value in the CubeCart_inventory, 'latest' column.

    The result of the query is cached, so be sure that after changes made in admin, that CubeCart's cache is cleared.

    A hard edit to the query, from I.data_added to I.updated will order the result by the date the product was last Saved in admin.

  8. In Store Settings, Stock tab, the setting "Main stock level as matrix stock level summary", when checked, will (should) cause the Add/Edit Product, General tab, "Stock Level" to show the sum total of the stock levels of the various Options Matrix combinations as seen on the Options tab.

    (The fact that Stock Level on the General tab is still editable is something for the CubeCart programmers to look into. Whether the edited value sticks at that value, I have yet to discern.)

    The methodology for the enforcement of the several approaches to stock level determination and enforcement have irregularly changed over the past dozen versions (or so).

    What version of CubeCart are you using?

  9. CC648 (now CC649) has adjusted many, many locations in the code to deal with the now increased strict attitude about certain things.

    Running CC647 and older under PHP 8 will have many warnings generated unless silenced.

    So, in ini.inc.php, near line 18:

    Find:
    
    error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
    
    Change to:
    
    error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING & ~E_DEPRECATED & ~E_USER_DEPRECATED);

     

     

  10. CubeCart 6.4.8 has put in place a different editor to compose Email Contents templates and Email/Newsletter Template templates (but not Newsletter Contents, Offline Message, Site Documents, Product or Category Descriptions). This different editor is the same one used to write PHP code Snippets. There is no WYSIWYG mode - there is only source-code mode.

    As such, there is a "Test" button that will open a 'colorbox' showing what the HTML will look like when rendered. However, none of the 'Macros' will be compiled. That is to say, {$BILLING.name} will still be that, and {foreach} loops will not show a list.

    For Email Contents templates, the attached file is instructions for code edits and files of sample data. The code edits provide a separate button to open a 'colorbox' showing the editor's contents as it will (should) look like after the template rendering engine (Smarty) compiles and populates the template with data.

     

    Test_Email_with_Data.zip

  11. That would be any of:

    • your hosting environment has acquired a 'cron' job that cleans up session files on a regular basis
    • your browser disposes of cookies for unknown reasons
    • records in the database table CubeCart_sessions goes missing somehow

    As for the cron job, that happened to me when I first installed PHP 7 on a local Linux server. (Installing PHP 8 alongside PHP 7 did not re-add that cron job). The job was to fire off every half-hour at 5 and 35 minutes after the hour, deleting all of PHP's session files. Session files are linked to the cookies recorded in the database.

     

  12. Is your hosting provider able to determine when, approximately, your specific server environment was changed from PHP8.1 to PHP7.4? And by who/what?

    CubeCart would need extraordinary power to overrule server operating system permissions to edit the necessary configuration files. (That said, I do not find any code in CubeCart that would - if it could - change server configuration files.)

     

  13. Regarding the template syntax error, an issue has been posted in the Github.

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

    3. Check the code in the admin skin file filemanager.index.php, near lines 122-129:

      {if $FILE.type == 1}
      <div>
        <label for="alt">{$LANG.filemanager.alt}</label>
        <span>
          <input type="text" id="alt" name="details[alt]" class="textbox" value="{$FILE.alt}">
        </span>
      </div>
      {/if}

    Also in this file, make this change:

    Lines 117-119, from:
    
          <select name="details[move]" id="move" class="textbox">
            <option value="">{$LANG.form.please_select}</option>
          </select>
    
    To;
    
          <select name="details[move]" id="move" class="textbox">
            <option value="">{$LANG.form.please_select}</option>
    {if isset($DIRS)}{foreach from=$DIRS item=dir}        <option value="{$dir.path}"{$dir.selected}>{$dir.path}</option>{/foreach}{/if} {* #3121 *}
          </select>

    1. Is this what CubeCart reports in admin, Dashboard, Store Overview tab? Or is this aspect of the server environment being shown somewhere else?

     

    • Like 1
  14. I can see why MySQL doesn't like that query. The use of an apostrophe (and quote) to indicate a measure of length (feet, inches) will cause problems.

    But the above does not look like what should be seen in phpMyAdmin - looking directly at the database.

    For having done the backup, did you also restore the database from that backup? If so, the rows of interest in the table CubeCart_system_error_log may now be lost.

  15. I am basically familiar with 'max_user_connections'. I have never experienced it, but I think it would happen if the site was being very heavily hit by hundreds of visitors all at the same time.

    Running out of memory... Line 1011 is where CubeCart is wanting to collect the 'backtrace'.

    Using an external database utility (such as phpMyAdmin found in your host account's control panel), view the table CubeCart_system_error_log. Find the row with the highest 'log_id'. What values are in the 'message' and 'backtrace' column?

     

  16. In my opinion, CubeCart is not yet coded to instantly detect when a given combination of option choices - including there being only one option - are not available.

    That is to say, red and blue, small and large, but only red small is not available, CubeCart still shows all assigned options. This is normal behavior.

    There are (or have been) plugins available to query CubeCart when the customer changes options.

     

  17. Please try this edit:

    In the file /classes/catalogue.class.php, near lines 1781-1783, find:
    
            if($GLOBALS['config']->get('config', 'hide_out_of_stock')=='1') {
                $search_data['inStock'] = true;
            }
    
    CUT to the system clipboard, then PASTE these lines just below this line, just a few lines down:
    
            if (!empty($joins) || is_array($search_data)) {
    
    So that the resulting area of code looks like:
    
            // Presence of a join is similar to presence of a search keyword
            if (!empty($joins) || is_array($search_data)) {
    
                if($GLOBALS['config']->get('config', 'hide_out_of_stock')=='1') {
                    $search_data['inStock'] = true;
                }
    
                if (!empty($search_data['priceVary'])) {

     

×
×
  • Create New...