Jump to content
Latest News: (loading..)

All Activity

This stream auto-updates     

  1. Past hour
  2. rebelsheep

    Creating New Navbar above Existing Navbar

    YES!! That works. Thank you for your help JcMagpie. I think I have just written my first (very simple) OSCommerce module. :-)
  3. rebelsheep

    Creating New Navbar above Existing Navbar

    And the parameters for NBRMenu will then be created.
  4. rebelsheep

    Creating New Navbar above Existing Navbar

    I think I know the problem. Install() hasn't run to create the parameters. Because I installed it with the breadcrumb parameters. So I need to unistall it them install it again so Install runs.
  5. rebelsheep

    Creating New Navbar above Existing Navbar

    I tried the Megamenu but it wouldn't work - installed ok in Amin, enabled it - but doesn't show in front end. Also it doesn't do what I want - it replicates the Category structure which I don't want to do. ... I still get blank SortOrder and blank parameters with cm_header_nbrmenu.php
  6. JcMagpie

    Creating New Navbar above Existing Navbar

    try this file. cm_header_nbrmenu.php
  7. JcMagpie

    Creating New Navbar above Existing Navbar

    I will take a look , but you may also try using this? https://apps.oscommerce.com/lf9R4&horizontal-megamenu-bootstrap
  8. rebelsheep

    Creating New Navbar above Existing Navbar

    Thank you. See attached. Just one file - cm_header_nbrmenu.php in catalog\includes\modules\content\header. Not sure if I need other supporting files. cm_header_nbrmenu.zip
  9. Today
  10. JcMagpie

    Creating New Navbar above Existing Navbar

    zip your files and either post or pm and i'll have a look
  11. rebelsheep

    Creating New Navbar above Existing Navbar

    So I am assuming something is wrong in function install()
  12. rebelsheep

    Creating New Navbar above Existing Navbar

    It worked when I changed the code in execute - and without further editing it was using the parameters from BREADCRUMB (because this was the file I copied). So now tried to give it it's own parameters - just enabled/disabled, SortOrder. But in Admin these values remain blank. What else do I need to do so values/parameters for this module are stored in the database? Here is the code: class cm_header_nbrmenu { var $code; var $group; var $title; var $description; var $sort_order; var $enabled = false; function __construct() { $this->code = get_class($this); $this->group = basename(dirname(__FILE__)); $this->title = "Notebook Repair Menu"; $this->description = "Notebook Repair Custom"; if ( defined('MODULE_CONTENT_HEADER_NBRMENU_STATUS') ) { $this->sort_order = MODULE_CONTENT_HEADER_NBRMENU_SORT_ORDER; $this->enabled = (MODULE_CONTENT_HEADER_NBRMENU_STATUS == 'True'); } } function execute() { global $oscTemplate; $mymenu = "<nav class='navbar navbar-expand-lg navbar-light bg-light'>"; $mymenu .= "<div class='collapse navbar-collapse' id='navbarSupportedContent'>"; $mymenu .= "<ul class='navbar-nav mr-auto'>"; $mymenu .= "<li class='nav-item dropdown nr-nav'>"; $mymenu .= "<a class='nav-link dropdown-toggle' href='#' id='navbarDropdown' role='button' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'>"; $mymenu .= "Autocab"; $mymenu .= "</a>"; $mymenu .= "<div class='dropdown-menu' aria-labelledby='navbarDropdown'>"; $mymenu .= "<a class='dropdown-item nr-nav' href='#'>Autocab PDAs</a>"; $mymenu .= "<a class='dropdown-item nr-nav' href='#'>Autocab Phones</a>"; $mymenu .= "<a class='dropdown-item nr-nav' href='#'>Autocab Radios</a>"; $mymenu .= "<a class='dropdown-item nr-nav' href='#'>Autocab Mobile Data Terminals</a>"; $mymenu .= "<a class='dropdown-item nr-nav' href='#'>Autocab Tablets</a>"; $mymenu .= "<a class='dropdown-item nr-nav' href='#'>Autocab Accessories</a>"; $mymenu .= "</div>"; $mymenu .= "</li></ul></div></nav>"; $oscTemplate->addContent($mymenu, $this->group); } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_CONTENT_HEADER_NBRMENU_STATUS'); } function install() { tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Header NBRMenu Module', 'MODULE_CONTENT_HEADER_NBRMENU_STATUS', 'True', 'Do you want to enable the NBRMenu content module?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_CONTENT_HEADER_NBRMENU_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); } function remove() { tep_db_query("delete from configuration where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_CONTENT_HEADER_NBRMENU_STATUS', 'MODULE_CONTENT_HEADER_NBRMENU_SORT_ORDER'); } }
  13. rebelsheep

    Creating New Navbar above Existing Navbar

    Cool. That works - kind of. Just need to get my head around parameters etc. for the install.
  14. rebelsheep

    Creating New Navbar above Existing Navbar

    $oscTemplate->addContent($mymenu, $this->group);
  15. rebelsheep

    Creating New Navbar above Existing Navbar

    And I put my custom code in execute() global $oscTemplate; $mymenu = "<nav class='navbar navbar-expand-lg navbar-light bg-light'>"; $mymenu = $mymenu . " <div class='collapse navbar-collapse' id='navbarSupportedContent'>"; $mymenu = $mymenu . " <ul class='navbar-nav mr-auto'>"; $mymenu = $mymenu . "<li class='nav-item dropdown nr-nav'>"; $mymenu = $mymenu . "<a class='nav-link dropdown-toggle' href='#' id='navbarDropdown' role='button' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'>"; $mymenu = $mymenu . "Autocab"; $mymenu = $mymenu . "</a>"; $mymenu = $mymenu . "<div class='dropdown-menu' aria-labelledby='navbarDropdown'>"; $mymenu = $mymenu . "<a class='dropdown-item nr-nav' href='#'>Autocab PDAs</a>"; $mymenu = $mymenu . "<a class='dropdown-item nr-nav' href='#'>Autocab Phones</a>"; $mymenu = $mymenu . "<a class='dropdown-item nr-nav' href='#'>Autocab Radios</a>"; $mymenu = $mymenu . "<a class='dropdown-item nr-nav' href='#'>Autocab Mobile Data Terminals</a>"; $mymenu = $mymenu . "<a class='dropdown-item nr-nav' href='#'>Autocab Tablets</a>"; $mymenu = $mymenu . "<a class='dropdown-item nr-nav' href='#'>Autocab Accessories</a>"; $mymenu = $mymenu . "</div>"; $mymenu = $mymenu . "</li></ul></div></nav>"; $oscTemplate->addContent($mymneu, $this->group);
  16. Dan Cole

    Email queuing system

    It failed on the older database. Versions as follows: Database it failed on: MySQL 5.5.52-MariaDB Database where it work. MySQL 10.2.22-MariaDB Changing... date_added datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, to date_added TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, seems to have sorted it and the subsequent data seems identical. Dan
  17. rebelsheep

    Creating New Navbar above Existing Navbar

    Actually will use the breadcrumb as the template - in \includes\modules\content\header
  18. rebelsheep

    Creating New Navbar above Existing Navbar

    So i just copy an existing module in includes/modules. So for example I copy nb_currencies.php And then when I edit it - it needs all the functions: function __construct() function getOutput() function isEnabled() function check() function install() function remove() function keys() ? And in which of the functions would I put the custom code? Thank you for your help, still learning.
  19. rebelsheep

    Creating New Navbar above Existing Navbar

    Ok, thanks, I will give it a go.
  20. JcMagpie

    Creating New Navbar above Existing Navbar

    Yes just make a new module header or nav and then you can select which order it shows on the site. Just pick an existing one rename it and add your code.
  21. Then your going to have to pay a developer to make that for you. For anyone else interested in doing this with attributes you can make it a bit easer for the customer by adding a simple calculator so they know how much they need.
  22. rebelsheep

    Creating New Navbar above Existing Navbar

    Or should I be inserting my custom code in to the website by creating my own modules?
  23. rebelsheep

    Creating New Navbar above Existing Navbar

    Is it possible to insert this code for this dropdown menu further down the page? Underneath the crumb?
  24. If your version has a filenames.php (and it came with the installation and is actually used), you can add missing file names. Otherwise, names get hard coded now, and you will have to find any place FILENAME_MODULES is used and replace it by the string 'modules.php'. That should not happen in base code, but it's quite likely in add-ons.
  25. BrockleyJohn

    Paypal Standard 2.2, Order deletion/regeneration issue

    I don't think there is an issue here. The ajax part is not standard functionality, it's been added but it sounds like your site is behaving normally. Some payment methods create an order before payment is taken and others don't. If someone chose to pay using Cash on Delivery, or Cheque etc the order would be saved on the checkout_process page after confirmation. In the case of paypal, sometimes people don't return from paypal to your site and if the order was not recorded in the checkout process there would be no record. An order is recorded in the preparing status. When they return from paypal or your site gets an IPN from paypal, the order is changed to a confirmed status. If they cancel in paypal, the order record is deleted and they end up at the checkout_payment page with the stuff in their basket. Similarly, if they deselect paypal as payment option before confirmation, the order is deleted. It just means that you don't have an order for every available number. There are card payment modules that behave in exactly the same way.
  26. MrPhil

    Email queuing system

    Do you mean "the DEFAULT change to TIMESTAMP"? datetime should still be a valid field type, shouldn't it? CURRENT_TIMESTAMP appears to be a more recent addition to MySQL -- is the failing database a much older version? I think the intent is that it acts like INSERT INTO with a now() value, but it can now be defaulted to do that. For older MySQL versions, it won't work, and you may have to explicitly give a now() in the VALUES list. That, or declare a minimum MySQL version number.
  27. Yes, it can easily be done when you’re selling products in a specific volume as shown in above price per unit volume example, but, I’m looking for a pricing solution that works for variable products according to the entered measurement values and calculate price in real-time.
  1. Load more activity
×