Jump to content

Portman

Members
  • Content count

    84
  • 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:
    https://forums.oscommerce.com/topic/409351-modular-shopping-cart/
    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
    rgds
    Rainer
     
  8. Like
    Portman reacted to raiwa in Purchase Quantity on Product Listing & info pages   
    https://apps.oscommerce.com/OxIFz&add-quantity-box-to-product-info-page
    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:
    require('includes/application_top.php');  
  11. Like
    Portman reacted to Tsimi in Cant find <del> for specials in product_info   
    Check the language file for the price product info module.
    ../includes/languages/english/modules/content/product_info/cm_pi_price.php
    const MODULE_CONTENT_PI_PRICE_DISPLAY_SPECIAL = '<del>%2$s</del> <span class="productPrice text-danger productSpecialPrice">%1$s</span>';  
  12. Like
    Portman reacted to Jack_mcs in No 'Boxes' in Fresh install of BS 2341   
    Try changing these lines
    define('HTTP_COOKIE_DOMAIN', 'creativeabundance.com.au'); define('HTTPS_COOKIE_DOMAIN', 'creativeabundance.com.au'); define('HTTP_COOKIE_PATH', '/sales/admin/'); define('HTTPS_COOKIE_PATH', '/sales/admin/'); define('DIR_FS_DOCUMENT_ROOT', '/home/creativ3/public_html/sales/'); to
    define('HTTP_COOKIE_DOMAIN', ''); define('HTTPS_COOKIE_DOMAIN', ''); define('HTTP_COOKIE_PATH', ''); define('HTTPS_COOKIE_PATH', ''); define('DIR_FS_DOCUMENT_ROOT', '/home/creativ3/public_html');  
  13. Like
    Portman reacted to clustersolutions in Display Price for Login Members Only   
    @Portman  This is where you can make it happen...it was a simple module.
    https://github.com/clustersolutions/osc-price-display-members-only/blob/9f3970e9e8dbf8deabe2100dbb5ff69a5db5e9c4/catalog/includes/modules/bootstrap/bt_price_display.php#L67
    You will need to make sure that the $customers_group_id was already registered as a session variable  before this module. Modify the if conditional statement to validate $customers_group_id per your requirements..
    if (tep_session_is_registered('customer_id') && tep_session_is_registered('customers_group_id') && $customers_group_id > 0 && defined(MODULE_BOOTSTRAP_PRICE_DISPLAY_STATUS) && MODULE_BOOTSTRAP_PRICE_DISPLAY_STATUS == 'True') { . . . I hope this make sense...but you need to test it to be sure.
     
     
    https://github.com/clustersolutions/osc-price-display-members-only/blob/9f3970e9e8dbf8deabe2100dbb5ff69a5db5e9c4/catalog/includes/modules/bootstrap/bt_price_display.php#L67 if (tep_session_is_registered('customer_id') && defined(MODULE_BOOTSTRAP_PRICE_DISPLAY_STATUS) && MODULE_BOOTSTRAP_PRICE_DISPLAY_STATUS == 'True') { if (tep_session_is_registered('customer_id') && defined(MODULE_BOOTSTRAP_PRICE_DISPLAY_STATUS) && MODULE_BOOTSTRAP_PRICE_DISPLAY_STATUS == 'True') {
  14. Like
    Portman got a reaction from burt in Responsive osCommerce - Bootstrap   
    never mind @burt... found it.... now to make sense of the whole ting
×