Jump to content


  • Content count

  • Joined

  • Last visited

Reputation Activity

  1. Like
    Portman reacted to BrockleyJohn in PHP error upgrading to 7.3   
    It's throwing that warning because the order instance it's trying to process has no products in it. That doesn't sound like a valid order to me, and could well indicate a problem with the construction of the order instance. If it's an existing order read from the database, check the database order to make sure it was created properly.
  2. Like
    Portman reacted to BrockleyJohn in PHP error upgrading to 7.3   
    The easy answer is: turn off displaying warnings.
    It's a warning not an error until some future version of php.
    in includes/application_top.php find:
    error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT); ini_set('display_errors',1); on a live site you may not want to display any error messages to the public, in which case in the second line change 1 to 0 (zero) or if you want only to suppress warnings, change the first line to
    error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_WARNING);  
  3. Like
    Portman reacted to BrockleyJohn in Quick swap of fields in address book   
    Yes choose a different address format for the country in admin > Locations/Taxes > Countries
  4. Like
    Portman reacted to LeeFoster in Change order totals in Order Confirmation   
    Go to admin -> modules -> order totals and change the sort order to what you want it to be.
  5. Like
    Portman reacted to raiwa in Creating Shopping Cart Mod   
    You need to add the " $wholesale_group " variable to the global list of the execute funtion.
    Sorry didn't see that you are using wholesale for this.
  6. Like
    Portman reacted to BrockleyJohn in Creating Shopping Cart Mod   
    It's really good to see you stopping to think about the best way to go about doing this instead of just doing a quick hack to the code.
    To answer your question the split in a content module between what goes in the template and what in the execute function is mostly about trying to separate the layout from the content - the idea is that on the whole a shopowner can use a module and change its appearance a lot just by configuring options and using css, but some people might need to change the template a bit (eg by adding extra classes) for the layout of their site. Templates are typically mostly html with only a little bit of php.
    However it's worth broadening things a bit. Content modules are only executed on a page with that content section (so header modules on all pages, main content modules on one specific page) and are about rendering specific content. There are also header tags modules which are more about changing the behaviour of the site and are executed earlier in the page.
    Personally I think I'd approach your addon differently. Ok, there's a message to display on the cart, but shouldn't the buyer also get bumped out of any checkout page back to the cart if it's below minimum order value? And shouldn't the checkout button on the cart be disabled below MOV? That feels more like a header tags module than a content module to me - you can just use the standard message class and content module to actually display the message on the cart page.
  7. Like
    Portman reacted to raiwa in Creating Shopping Cart Mod   
    Hello Pete @Portman,
    First of all you should better post this question in the official support thread:
    To create a new shopping cart module follow these steps:
    - choose a similar existing module like "cm_sc_no_products.php"
    - duplicate and rename all files (main file, template file, language file(s)
    - important: keep the naming convention for the template file: same name as the main files + "tpl_" prefix.
    - rename the class name in the main file to the same name as the new filename
    - rename all constants "MODULE_CONTENT_SC_NO_PRODUCTS_..." to a new name like "MODULE_CONTENT_SC_MINIMUM_ORDER_..."
    - change the configuration entry descriptions and the language definitions for your needs
    - add your language definitions to the language files
    - rename the template class "cm-sc-no-products" to your correspondant new module name
    - place the first part of your cod (data checks) into the main module inside the execute function
    - don't forget to remove the code of the original module
    - add the required variables to the globals list (in your code I believe only $cart is needed, it's already there.
    - replace the html output in the template file with your second part of code
    Install your new module in Admin : modules : content[shopping_cart] (adjust the sort order for your needs)
    Hope this helps
  8. Like
    Portman reacted to raiwa in Purchase Quantity on Product Listing & info pages   
    may need some update for your store version.
  9. Like
    Portman reacted to Heatherbell in Purchase Quantity on Product Listing & info pages   
    @Portman Quantity input module was released by @burt as part of his 28days 2019 modules. Looks and works great on our shop so contact him if you need it.
  10. Like
    Portman reacted to raiwa in call to new function in addon   
    Hello Pete @Portman,
    If you added the function outside the module class as a independant function, it should be available if the module is active on the product_info page.
    Check if there is a page selection if you have product_info.php included.
    Then the store module is loaded in template_top.php (supposed it's one of my store module  add-ons, it is a modified header_tag module).
    Therefore the function will not be available before the template_top.php call:
    require('includes/template_top.php'); If you need the function before, you should opt to include it in includes/functions/general.php instead of adding it to the module.
    Then it is available everywhere after: