Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Posts posted by bsmither

  1. Go to admin, Maintenance, Database tab. Scroll to the table CubeCart_geo_country. Make note that there are zero records.

    Obtain the following file from a stock download of CubeCart and load it into a text editor: /setup/db/install/data.sql

    Then, in admin, Maintenance, Query Database (Advanced), take note of the Query box. You will be pasting a lot of lines in here.

    From the file, starting at about line 507, there will be 243 lines (all the way to the bottom of the file, don't miss getting all of the last line) that needs be copied to the system's clipboard, then pasted into the Query box. Then click Go.

    Note: I haven't actually done this, so, be prepared if this does not go as desired. The only table being affected is CubeCart_geo_country which holds all the country names.


  2. Then there is a possibility that your products or services might be illegal in certain counties/countries. There must be the means to enable/disable sales and shipping (a feature of the extensions) accordingly.

    In admin, Store Settings, Features tab, Misc section, "Allow delivery to non-invoice address" is not checked. I think this is the setting that forces the delivery address to be the same as the billing address.


  3. It will take a lot of work.

    Also realize that some credit card processors want want to verify billing address data with the card's bank - a means to prevent fraud. (I have no idea how PayPal handles this.)

    But that would be when CubeCart is communicating with the payment processor, not when the customer is sent directly to the processor.

    Still, a lot of work.

  4. When clicking on the shopping cart icon, the entirety of the display is supposed to slide left-wards, allowing for the "off-canvas" portion hidden off to the right of the page to slide into view.

    Your skin has the "off-canvas" portion slide into view but the whole display does not move.

    This suggests that there is a missing or extra <div> block of code or tag that is confusing the operation of the skin.

    Please examine a stock, unmodified copy of the Foundation skin template 'main.php'.

    Find the following:

                      <div class="row show-for-medium-up">
                         <div class="small-12 columns">{include file='templates/box.search.php'}</div>
                <div class="row hide" id="small-search">
          <div class="row hide" id="small-search">

    It is apparent that you removed the third and fourth line but should also have removed the fifth line. There is one too many closing </div> tags here.

  5. The "#id select" might not be what you want.

    Maybe "#id option:selected". This should find all selected options from the specific DOM node having id="id". (So, this selector may need to be set to 'multiple' to allow to choose five options.)

    Or maybe "[id^='maingroup'] option:selected". This should find all selected options from the group of selectors having id="maingroup_no1", where no1 is the specific id of the first selector, and no2 is the specific id of the second selector, etc. The format id^='maingroup' means that the id must start with maingroup, and jQuery will find all of them. Then .each() will work on them in turn.


  6. There is this:


    which gives a few Developer articles.

    And a discussion of your needs can happen here in the forums.

  7. There will be some problems with PHP 8.0+. There are several incompatible changes compared to earlier PHP version families.

    PHP 7.3 is in the same situation as PHP 5 - end of life.

    I think PHP 7.4 would work without too much trouble for CC642, - again, end of life.



    • Like 1
  8. That would be the solution, but what would be a common attribute among the five selectors, and yet not include the sixth selector?

    Each selector is a distinct "option" (an option group of attributes) in its own right. There is nothing to relate them as a collection.

    "handle the interaction between the selected option and the corresponding action or data"

    The customer selects and option from the selector. But what do you mean by "corresponding action or data"?

  9. If you are still interested in showing Featured Products on the Homepage instead of Latest Products, here are two Code Snippets that will do that.

    The first is to get a random subset of all (eligible) products with the 'featured' flag set, and send it to the skin template.

    The second is to suppress the Featured Product box on the homepage because the featured products are getting listed there anyway.

    In admin, Manage Hooks, Code Snippets tab, click the Add Snippet link. When the page refreshes, there will be a form at the bottom. Fill it in as follows:

    Enabled: checked
    Unique ID: swap_fp_lp_1@cc6114+
    Execution Order: 99
    Description: Find random subset of featured products.
    Trigger: class.cubecart.latest_products
    Version: 1.0
    Author: https://forums.cubecart.com/topic/58982-show-random-products-in-sidebarhomepage/
    PHP Code:
    $swapwhere = $GLOBALS['catalogue']->outOfStockWhere(array('I.status' => '1', 'I.featured' => '1'), 'I');
    $swapquery = sprintf("SELECT I.* FROM `%1\$sCubeCart_inventory` AS I JOIN `%1\$sCubeCart_category` AS C ON C.cat_id=I.cat_id AND C.`status`=1 AND $swapwhere ORDER BY I.date_added DESC, I.product_id DESC", $GLOBALS['config']->get('config', 'dbprefix'));
    if (is_array($featuredProducts = $GLOBALS['db']->query($swapquery, (int)$GLOBALS['config']->get('config', 'catalogue_latest_products_count'))) && ($count = count($featuredProducts)) > 3) {
        foreach ($featuredProducts as $fP) { $preparedFeaturedProducts[$fP['product_id']] = $fP; }
        $randomSelectionOfFeaturedKeys = (array)array_rand($preparedFeaturedProducts, (int)(1+$count/2));
        $latestProducts = array_intersect_key($preparedFeaturedProducts, array_flip($randomSelectionOfFeaturedKeys));
        $tmpLANG = $GLOBALS['smarty']->getTemplateVars('LANG');
        $tmpFP_LANG = $tmpLANG['catalogue']['latest_products'];
        $tmpLP_LANG = $tmpLANG['catalogue']['title_feature'];
        $tmpLANG['catalogue']['title_feature'] = $tmpFP_LANG;
        $tmpLANG['catalogue']['latest_products'] = $tmpLP_LANG;
        $GLOBALS['smarty']->assign('LANG', $tmpLANG);

    Click Save.

    For the second:

    Enabled: checked
    Unique ID: swap_fp_lp_2@cc6114+
    Execution Order: 99
    Description: Supresses Latest Product box on homepage
    Trigger: class.gui.display_random_product
    Version: 1.0
    Author: https://forums.cubecart.com/topic/58982-show-random-products-in-sidebarhomepage/
    PHP Code:
    if ($GLOBALS['smarty']->getTemplateVars('SECTION_NAME') =='home' && $GLOBALS['session']->get('fp_lp_swapped') ) { $product = false; $GLOBALS['session']->delete('fp_lp_swapped'); }

    Click Save.

    CubeCart will want you to clear its internal cache.

  10. From among all the products that has the "Include in Featured Products" checkbox checked (which is checked by default when adding a new product), CubeCart tries up to 15 times to randomly select a product that belongs to a category that is enabled and not hidden, is in stock if stock levels are being enforced, and is itself enabled.

    There is a Code Snippet that swaps the Best Sellers with the Latest Products. It could easily be adapted to show a set of randomly chosen products from the Featured Products group.

  11. There is a form validator that could be enhanced to make sure any one selection is not the same as any other selection.

    There is also the idea of making that option as a set of checkboxes (there would need to be a custom layout) where any five can be checked. But CubeCart is not yet fully coded to show checkboxes.

    There is also the idea of a single text field where the numbers can be entered, separated by a space, comma, or dash (there would need to be a custom verification), where the label says "Enter five different numbers between 1 and 70". (I think this is the easiest.)


  12. There is a choice to make when using CBurst:

    Keep all the assigned images (Main_images_1 through Main_images_7), and not use the 'image per option' feature, or

    Assign only Main_image_1 (gold star), allowing to use the 'image per option' feature.

    After changing which images are assigned to the product, click CubeCart's Clear Cache button.

  13. Is this still the problem of showing the designated image that is assigned to a specific product option?

    This is a recent feature of CubeCart's core code, where probably only the Foundation skin has been enhanced to display this feature.

    Please post a web address where we can see the problem.

  14. "All skins"? It looks like Foundation is working. The "Girl Engine Grey" selection shows an image of a figure that looks grey, and the "Girl Engine Blue" selection shows an image of a figure that looks blue.

    "unable to update the corresponding product images"

    I see that the product above still have secondary images assigned. If you un-associated all the secondary images and saved the changes, please be sure to have CubeCart clear its internal cache.


  15. From what I see, the CBurst "View Product" page will show a "Swipe Gallery" if there are more than one image assigned to the product. (This is not where images can be assigned to options.)

    If there is only one main image assigned to the product, there is no gallery. (The images posted above suggest there is more than one image assigned to that product.)

    Try assigning only one image to this product. Then there will be no gallery. Then selecting an option should show the image assigned to that option.

  16. There used to be a plugin that gave the admin a link placed at various locations around admin that would bring up an email editor to compose an ad hoc message and send it off. Unfortunately, the plugin author is no longer listed in the Marketplace.

    Since there was a plugin, this is not a stock CubeCart feature, and it has not been implemented as such.

  • Create New...