Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by bsmither

  1. "a decision is needed to keep or dump the 'items per page' selector" It looks like CB-Streamline is coded to not show the drop-selector that CubeCart core code provides to the sin. Your skin code: {if $PRODUCTS} <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} Foundation skin code (effectively): <div class="row"> <div class="small-12 large-8 columns"> {$PAGINATION} </div> </div> So, we know that CubeCart already populates the $PAGINATION skin variable if necessary. However, I see CB-Streamline and Foundation both devoting a div row whether or not $PAGINATION has anything in it. (The variable $PAGINATION is a compiled skin template element.pagination.php populated in Database->pagination(). So, whether you use the element template directly, or use $PAGINATION, it should make no difference.) That said, to suppress that div row, surround it as such: {if $PAGINATION} <div class="row"> <div class="small-12 large-8 columns"> {$PAGINATION} </div> </div> {/if}
  2. Maybe you missed the colon? You said: https//www.clau Should be: https://www.clau "a decision is needed to keep or dump the 'items per page' selector"
  3. First is to ask them to examine any web server error logs. Then, make any necessary adjustments to what triggered the 500ISE. That could be a trigger on suspect sequences of characters in GET or POST (as determined by any security application installed on the server), a misconfigured directive in any .htaccess file, or (because we actually haven't ruled out PHP errors) to give advice on any PHP errors -- even though there isn't a viewable PHP error log being written in CubeCart's main folder.
  4. 1. "I want to be able to code special images into the description." When composing the category description, click the Image toolbar icon. A window will popup where you can specify the web address of the image to use. 2. "If a category only has one page of products the space for pagination still shows." The "space", or an actual but incomplete pagination? Do you have the [More V] method of pagination, or the Page 1 [2] method? If the "Page" method, then there is also the drop-down selector offered to the customer to show other than default number of products per page. I agree that this is not needed if you have a matching number of products for the smallest number per page configured for the skin. But if there is a smaller number (say, as a default, 12, but also there is an option for 6), then a decision to keep or dump the selector needs to be made. If dumping, we can try to code the pagination row to not show if count matches number per page. 3. "Does it seem since CC6.4.3 you have to clear the cache more often?" Since a few versions back, CubeCart no longer automatically clears the cache each time an admin form is POSTed. Now, it is suggested that the admin perform all necessary daily/weekly duties, and only then when finished, clear the cache. However, when performing initial setup and infrequent development tasks, we suggest setting CubeCart to have its cache disabled.
  5. This additional part of the response: "Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request." suggests that the error is being triggered by the web server itself. So, see if there exists a web server error log -- if being hosted, you may be able to fetch/view the web server logs via the hosting control panel.
  6. It is entirely possible to fix it, but we would want to know the error message logged.
  7. "If logged in it won't let me access it" That's odd. I'll look into it.
  8. It is possible to clear the cache file (PHP's unlink() function) for a single and distinct SQL query. But one would have to know the exact string that was constructed and sent to the database to recalculate the encoded filename of the cached query file. CubeCart has a debug mode that will give you the encoded filename for each query made. In /classes/catalogue.class.php, line 1406, getProductStock(), there is: if (is_numeric($product_id) && ($products = $GLOBALS['db']->select('CubeCart_inventory', array('stock_level'), array('product_id' => (int)$product_id), false, 1, false, false)) !== false) { The last (7th) argument above is false, which says to not use the cache for this query: not to look in it and to not cache the results sent back from the database. (So, thus, there is no file in the cache for this.) Which suggests that the "old" stock level on the storefront that you are complaining about is to be found elsewhere than on the View Product page. We need to know where that location is so we can go look for the query that is permitted to use the cache. Because stock levels are very dynamic, queries that ask for it are coded to not use the cache. So, your observation is strange indeed. Maybe a plugin?
  9. Welcome Greenreader! Glad to see you made it to the forums. CubeCart itself has a couple of methods of redirecting that does not involve the .htaccess file. The first is that for Site Documents (Homepage, T&C, Privacy, et al), the Add/Edit screen, General tab, has a text field that, if a URL is entered here, CubeCart will direct the browser to go there instead of displaying the internal content (Content tab). The following selector determines whether the browser should show this alternate content in the same window or open a new window. This is not a solution to the Contact Us form page. But, you can disable the internal Contact Us form, create a Site Document named Contact Us, and have it point to an alternate URL. (I will need to check if having a Site Doc with the same name as the Contact Us form would confuse CubeCart.) (The second is for the scenario where you want an obsolete friendly path to point to the newer, current, CubeCart recognized friendly path. For example: FROM: test-category/test-product TO: test-category/test-sub-category/test-product So, this is not a solution for your task.)
  10. I see that your OP specifies that you want your customers to be able to register (their option, I suppose). That still leaves the obstacles to be solved are at the checkout stage. There is no requirement that the customer create an entry in the Addressbook. But now, as a logged-in user, a different part of the checkout.confirm template is put in play. That needs to be sussed out.
  11. I am testing with the Print Order Form. It doesn't go past Pending. A promo code that effectively zeros the total? CubeCart does push that to Complete. Do you have a PHP error_log?
  12. Yes, actually wanting to create an account is one of the things that needs further work. As well as a need to check that T&C's are agreed to, validate reCaptcha, etc, as mentioned earlier. Can you test the sequence as a ghost customer? That is, do not try to create an account.
  13. 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.
  14. Just to make sure, in admin, at the upper right corner, is a button labeled Clear Cache. Click that.
  15. Let's try what has been developed so far. Several settings you need to make in the Store Settings: Be sure there are no enabled shipping modules. Disable initial shipping and tax estimates. Checked. Allow delivery to non-invoice address. Unchecked. Allow order Processing status to be skipped. Checked (maybe). Allow physical orders even if no shipping options are available. Checked. These settings seem to be irrelevant for a digital-only shopping basket, but, set these just to make sure. There will be three edits to the Foundation skin, two in the template content.checkout.confirm.php and one in the template element.js_foot.php. If you are not using Foundation, we need to explore how to implement this in the skin you are using. content.checkout.confirm.php Line 180, from: </address> {if $TERMS_CONDITIONS} To: </address> </div> {if $TERMS_CONDITIONS} Line 137, from: <h3>{$LANG.address.billing_address}</h3> {if !$ALLOW_DELIVERY_ADDRESS}{$LANG.address.ship_to_billing_only}{/if} To: <div class="hide" id="address_billing"> <h3>{$LANG.address.billing_address}</h3> {if !$ALLOW_DELIVERY_ADDRESS}{$LANG.address.ship_to_billing_only}{/if} element.js_foot.php Line 13, from: <script>{literal}$(document).foundation({equalizer:{equalize_on_stack:true}});$('.bxslider').bxSlider({auto:true,captions:true});$('.chzn-select').chosen({width:"100%",search_contains:true});{/literal}</script> To: <script>{literal}$("address").parent().remove();$(document).foundation({equalizer:{equalize_on_stack:true}});$('.bxslider').bxSlider({auto:true,captions:true});$('.chzn-select').chosen({width:"100%",search_contains:true});{/literal}</script> The above wraps the billing address group of form elements in a div block similar to how the delivery address group is done. This allows for a javascript function to remove the groups of code -- not simply hide it which would still submit empty form fields, causing problems later on. There is an edit to be made in the core code file /classes/cubecart.class.php. Fortunately, there is a nearby hook we can write a code snippet against, but let's try the edit first. (Be aware, upgrades will undo this edit - that's why hooks exist.) /classes/cubecart.class.php Near line 967, from: $GLOBALS['smarty']->assign('VAL_CUSTOMER_COMMENTS', isset($this->_basket['comments']) ? $this->_basket['comments'] : ''); foreach ($GLOBALS['hooks']->load('class.cubecart.construct.confirm') as $hook) { include $hook; } To: $GLOBALS['smarty']->assign('VAL_CUSTOMER_COMMENTS', isset($this->_basket['comments']) ? $this->_basket['comments'] : ''); $this->_basket['billing_address']['user_defined'] = true; $this->_basket['delivery_address']['user_defined'] = true; $this->_basket['customer'] = $_POST['user']; foreach ($GLOBALS['hooks']->load('class.cubecart.construct.confirm') as $hook) { include $hook; } These three new lines are necessary to put required values in the basket that would have been done had there been anything from Billing that arrived in $_POST. The required basket values are the result of what would have been generated from validating the $_POST payload -- billing address fields, delivery address fields, etc. But, since none of that is now in $_POST, we need to fake a few things. Within this validation section of the code, there are a few other things that may need to be dealt with: Still need to check T&C's are agreed to, validate reCaptcha, check email for valid format and prior use, password matching if the customer actually wants to create an account, valid phone number format, and creating a ghost customer in CubeCart_customers database table (important because currently, the billing and delivery name fields in CubeCart_order_summary are empty). I still need to test this having taken an order through a simulated payment transaction.
  16. This project all looks good so far, but be aware that since Billing and Delivery fields are now blank, email templates and a couple of other outputs need editing to remove the odd blank areas.
  17. 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.
  18. The Module class (/classes/module.class.php) takes care of a lot of the administrative functions of managing modules. Let's take a quick look at the All-in-One-Shipping module. In the module's shipping.class.php file, we see for example: private $_group_name = "All In One Shipping"; Then, in the module's file /admin/index.inc.php, near line 33: $module->module_settings_save($module->_settings); We can add, just above that: $module->_settings['group_name'] = $module->_group_name; This allows us to specify certain settings in the class file or in the settings index file, but we need to call the Module class's 'module_settings_save()" function to record those settings. The settings will end up in the Smarty array $MODULE. Generally, there are no "global" variables with respect to Smarty templates. There must be some code in the PHP core files (possibly including such as the module's shipping class and the admin index file - but not really) that uses Smarty's assign() function to give values to template variables: $GLOBALS['smarty']->assign('VAL_SELF','some_url_path'); However, the Module class takes care of things like this - assigning values to template variables. Look at the end of the module's admin settings index file: $module->assign_to_template($template_vars, false);
  19. If using CC642 or later, a new scheme of managing whether links have or have not the trailing .html has been implemented. As such, hard-coded links in versions of skins developed for CubeCart prior to that version will need to be updated. So, if you are using a skin other than the Foundation skin that shipped with CC643, the links to Search, and a few others, are probably hard-coded and need to be fixed. If so, look at the Foundation template that has the search link in it, and note how the ".html" part has been replaced with an element from the $CONFIG array.
  20. 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.
  21. 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.
  22. Ok, good to know. I've been tracing the code. I think I am at the last obstacle.
  23. That should have worked. In Store Settings, Advanced tab, enable debugging. Enter your local IP address in the following field (www.showmyip.com). Now, when viewing any page, below the contents, there will be a grey debug section. Look in the SESSION: section, '__system' element, 'version_check' key. It should have a value of 1. The value will obviously be '1' after the dashboard gets displayed, and viewing all pages after that. (It seems that SESSION is given to the debug spool before the version check is made, so the very first viewing of the Dashboard will not have 'version_check'. But the 'false' expression that is now part of the if() test should keep the code from making the test in the first place.) The actual admin login screen should not have 'version_check' at all.
  24. FYI and to be clear: CubeCart 6 does not come packaged with any modules. However, the first time you view admin, Manage Extensions, CubeCart determines if you have any module of types gateway and shipping already installed, and if not, will fetch PayPal Commerce and All-in-One-Shipping as needed and install them automatically.
  • Create New...