Jump to content

bsmither

Member
  • Posts

    18,014
  • Joined

  • Last visited

  • Days Won

    605

Posts posted by bsmither

  1. "At the check out the packaging shipping weight is not shown in the total weight."

    I can concur.

    In the AIOS shipping class file, the basket details are copied into the class's parameters so that the class can incorporate the total product weight, basket sub-total, and count the number of products (optionally not count digital items).

    What will need to happen is for the shipping module to change the basket details adding a calculated - likely a fixed - shipping carton weight to the basket's (total) 'weight'.

    What needs to be verified is, how reliable will be this new weight value. If the basket 'weight' is calculated for every page load, then the reliability should be high. But if ever the shipping class is called to recalculate shipping costs where the basket 'weight' already includes a previous shipping weight addition, then there is now two additions.

    Or, the shipping class can add a separate shipping weight detail to the basket. That would require a small edit to the checkout template, admin order summary page, and the database. Not needed anywhere else because the customer never sees how the shipping charges are calculated.

    And then there needs to be consideration given to how to deal with the possibility that there may be more than one shipping module enabled, each advising the basket of their respective shipping carton weights.

  2. Determine if the following statement already exists in the templates 'main.php' and 'main.checkout.php':

          <link href="{$ROOT_PATH}favicon.ico" rel="shortcut icon" type="image/x-icon">

    If it is not there, add it just before the </head> tag.

    Next, acquire a square image you want to use. Upload it to a free online ICO file maker, such as:

    https://www.icoconverter.com/

    Place the .ico file in CubeCart's main folder.

    • Like 1
  3. In the skin's config.xml, find the <image reference="category">. It is set for 800 pixels on the longest dimension.

    Change this to 900. It will auto-scale down to fit the container (which is 848 px wide).

    Next, you will need to find the CSS rule (I do not know where it would be.):

    .cat-hdr-img img {
    	margin: 0px auto 5px;
    }
    
    Change to:
    .cat-hdr-img img {
    	margin: 0 0 5px;
    }

    This CSS change will remove the margin that the browser adds to either side of the image, in equal part, to center the image in the slightly wider container.

    Be sure to clear Cubecart's cache.

    • Like 1
    • Thanks 1
  4. Please verify something: In admin, Store Settings, Extra tab, GDPR section, is the "Cookie Compliance Dialogue" checkbox checked?

    I am thinking that the only way to get the GA code to appear is for $smarty.cookies.accept_cookies to be true, which means there must be an actual cookie named 'accept_cookies', and the only way to get that cookie is to display the "We use cookies" dialog window and click on the 'Accept' button , and the only way to display that dialog window is to enable this store setting.

     

  5. I am not seeing any of the GA javascript code in the page.

    We would like to know the exact version of CubeCart you are using, and if you have kept an older version of Foundation as the primary skin to use.

    View the contents of main.php to determine if there is this near line 21:

    {include file='templates/element.google_analytics.php'}

    Then, determine if there is a template file named element.google_analytics.php, and if so, view the contents of that file. Is the first line this?

    {if isset($smarty.cookies.accept_cookies) && $smarty.cookies.accept_cookies=='true'}

    If your site is being hosted, the hosting provider may have given you a control panel to access your account settings. There will be a file viewer in that control panel you can use to view these files.

  6. Currently, the Foundation skin template main.php has this statement at line 21:

    {include file='templates/element.google_analytics.php'}

    Looking in the template element.google_analytics.php, we see that (and this has been the case for some months now) the visitor must have agreed to the use of cookies in order for GA to work. You must also not have configured your browser add-ons (no-script, cookie-basher, etc) to whitelist Google's cookies and javascript.

    Notice also the use of {literal} and {/literal}. The Smarty template engine reserves for itself the use of braces to indicate what is and what is not Smarty code. So, if any code in a template has braces, it must follow a syntax rule, or be enclosed in these tags. The syntax rule is that braces must have whitespace next to them. Whitespace is a space, new line, or tab.

    Looking at your code above, we see that line 5 has braces with a character other than whitespace right next to the brace character. This is a syntax error and will cause Smarty to throw an exception (which CubeCart does not yet catch).

    The GA code template is included in the main.php, main.checkout.php, and main.stream.php templates, which covers all pages.

    If you really need to use your version of the GA code, you can create your own version of element.google_analytics.php, after fixing the syntax error, or wrapping your code in {literal} tags.

  7. Welcome OpenTheDoor! Glad to see you made it to the forums.

    From what I recall about CC626, the admin can create a category, but keep "Visible" unchecked.

    Products can still be assigned to it as their primary and only category.

    These products will still be found in a search, however.

    For a more versatile solution, you may be interested in:

    https://www.cubecart.com/extensions/plugins/category-document-security-plugin-customer-groups-security-plugin-for-cubecart

     

  8. In admin, Sales Reports? or Statistics, Best Selling Products tab?

    If Statistics, CubeCart queries the CubeCart_order_inventory table and has the database engine sum the quantities sold per product. Generally, a store owner will not want to disturb the contents of this table.

    That said, getting a Data Export module built that will run in the Sales Reports section to show this same Best Selling info, but broken down by selectable time periods (month, season, quarter, year) would be helpful in a number of analysis scenarios.

     

  9. Short answer: Yes.

    It seems a simple edit can be made to stop that. Unfortunately, there is no handy hook that could be used to override a parameter to the function that increments the popularity based on views.

    However, in admin, a sorting can be set to choose 'views' or 'sales' to determine what shows up in the Popular Products (Best Sellers) box.

     

  10. Let's do it in the skin.

    In the admin skin, products.index.php, find:

    Near line 169:
    <div><label for="product_code_auto">{$LANG.catalogue.product_code_auto}</label><span><input name="product_code_auto" id="product_code_auto" type="hidden" class="toggle" value="{$PRODUCT.auto_code_checked}"> <input name="product_code_old" id="product_code_old" type="hidden" value=""></span></div>
    
    Change to:
    <div><label for="product_code_auto">{$LANG.catalogue.product_code_auto}</label><span><input name="product_code_auto" id="product_code_auto" type="hidden" class="toggle" value="0{* $PRODUCT.auto_code_checked *}"> <input name="product_code_old" id="product_code_old" type="hidden" value=""></span></div>

    Then, there is another change in the admin skin's admin.js file, find:

    Near line 243:
        if($("input#product_code").length > 0) {
            $("input#product_code").val().length > 0 ? $("input#product_code_auto").val('0') : $("input#product_code_auto").val('1'); $("input#product_code_auto").change();
        }
    
    Change to:
        if(false && $("input#product_code").length > 0) {
            $("input#product_code").val().length > 0 ? $("input#product_code_auto").val('0') : $("input#product_code_auto").val('1'); $("input#product_code_auto").change();
        }

    The programmers really, really wanted to make sure that the product getting a code is super-duper idiot-proof.

  11. Your conclusion is correct.

    Regarding the "Auto Generate Product Code" checkbox, CubeCart treats this as a priority, meaning, if checked, regardless if you enter a value in the text box, CubeCart will create a product code for you.

    Contrary-wise, if the checkbox is unchecked, yet the text box is left empty, CubeCart will still create a product code for you.

    (Note: When adding a new product, several things are set as default: status is checked, Auto Generate is checked, a suggested SEO path is created, selected to be Featured, selected to be in Latest Products, and selected to enforce stock levels.)

    Are you not able to uncheck this checkbox?

    Or do you want it initially unchecked when adding a new product? That can be done in the skin or the core code.

     

  12. We need to find out why they aren't 'sticking'.

    My experience tells me to first look at those settings that could possibly make the aggregate amount of content larger than 64KiB. Those settings are the Offline Message and Copyright Text.

    Then second, look at the error log.

    • Like 1
  13. Yes, indeed.

    Please understand what is happening:

    In admin Store Settings, observe the various tabs across the top: General, Features, Layout, Stock, Search Engines, etc.

    These tabs drive a javascript function that causes the related panel of info to acquire the CSS property that makes that panel "visible". All other panels of content are not displayed.

    When clicking the Save button, all of the form elements on all of the panels of content - visible and not - get sent from the browser.

    So, even when you are only changing one or two settings, the web form is still sending all of the form's elements from all of the panels - because Store Settings is, in fact, one very long form that only a part of it is visible at a time.

    Your browser's Developer Tools, Network tab can show you the details of what was POSTed to your site.

     

    • Like 1
  14. For CubeCart not accepting any of the general store settings probably means that one or more of the admin-supplied data items is extraordinarily long.

    Settings that could get out-of-hand include a really long Offline Message, or a really long Copyright Text.

    All the data is probably getting sent from the browser to CubeCart, but then CubeCart wants to "serialize" all that data, and the limit is 64KiB.

    You might also want to create the error log to see if CubeCart is complaining about anything.
    https://forums.cubecart.com/topic/51550-how-to-create-the-error-log/

     

    • Like 1
  15. We recommend making changes to language phrases in admin, Languages, then click on the language you wish to change.

    On the page that shows next, choose the Catalogue group. Find and click on the phrase key 'gift_certificate'. This enables the text entry field for editing.

    CubeCart uses "Gift Card" throughout the program. It may be quite the effort to rename everything.

    A trick to add items to the Nav bar is to create a Category with no items in it. Comprehensive textual content can be written for it and will be displayed when the visitor views that "category".

     

  16. My bad.

    Replace that other new code with this new code:

    					if (!empty($item['product_options'])) {
    						$product['product_options'] = array();
    						if (($list = unserialize($item['product_options'])) !== false) {
    							foreach ($list as $value) {
    								$product['product_options'][] = $value;
    							}
    						} else {
    							if(method_exists($order,'unSerializeOptions')) {
    								$options = $order->unSerializeOptions($item['product_options']);
    							} else {
    								if(empty($item['product_options'])) {
    									$options = array();
    								} else if(($options = cc_unserialize($item['product_options'])) !== false) {
    								} else if (($options = cc_unserialize(base64_decode($item['product_options']))) !== false) {
    								} else {
    									$options = explode("\n", $item['product_options']);
    								}
    
    							}
    							foreach ($options as $option) {
    								$value	= trim($option);
    								if (empty($value)) continue;
    								$product['product_options'][] = $value;
    							}
    						}
    						$product['product_options'] = implode("\n", $product['product_options']);
    					}

     

    • Like 1
  17. The POF module prior to 1.2.2 had its own code to email a courtesy email confirming the order was placed. Version 1.2.2 now is supposed to use the established code in CubeCart's core codebase.

    Looking at 1.2.2 (version 1.3.0 is the same), it seems more work needed was mentioned to the programmers, but didn't get done.

    So, please make this edit:

    In the Print Order Form module, gateway.class.php, near line 206, find:
    
    					if (!empty($item['product_options'])) $product['product_options'] = implode(' ',unserialize($item['product_options']));
    
    Change to:
    
    					if (!empty($item['product_options'])) {
    						if (($list = unserialize($item['product_options'])) !== false) {
    							foreach ($list as $value) {
    								$item['options'][] = $value;
    							}
    						} else {
    							if(method_exists($order,'unSerializeOptions')) {
    								$options = $order->unSerializeOptions($item['product_options']);
    							} else {
    								if(empty($item['product_options'])) {
    									$options = array();
    								} else if(($options = cc_unserialize($item['product_options'])) !== false) {
    								} else if (($options = cc_unserialize(base64_decode($item['product_options']))) !== false) {	
    								} else {
    									$options = explode("\n", $item['product_options']);
    								}
    								
    							}
    							foreach ($options as $option) {
    								$value	= trim($option);
    								if (empty($value)) continue;
    								$item['options'][] = $value;
    							}
    						}
    					}

     

    • Like 1
  18. I am wondering if, somehow perhaps a bug in the code, installing de-DE "over" the existing de-DE language pack, didn't actually overwrite the existing databased content of the email-contents with the contents of the new file of that incoming language pack. (Unlike the language phrases that exist in a file in a language pack, the phrases of the email-contents file of the language pack are all databased.)

    I will check on that.

    In the meantime, you can sort the above listing and delete all rows having 'content_id' equal to or greater than 26.

     

    • Like 1
×
×
  • Create New...