Jump to content
Latest News: (loading..)

PupStar

Members
  • Content count

    896
  • Joined

  • Last visited

  • Days Won

    10

PupStar last won the day on February 5 2017

PupStar had the most liked content!

Profile Information

  • Real Name
    Mark
  • Gender
    Male

Recent Profile Visitors

26,471 profile views
  1. @@piernas OK thanks, I have now sorted the button height by adding this to user.css .button-height {height: 40px;} and only adding the class to the buttons not in the standard addon did you have any luck with the reorder issue Mark
  2. @@piernas Thanks for getting back to me. I will have a look at the code and report back
  3. @@piernas still not resolved issue 1 and 2 above, any chance you could revisit and advise? Thanks Mark
  4. @@piernas ok I have created another button called 'Home' using the same principles applied to the spare_parts button. Now 3 issues I can not seem to solve: 1. The sort order does not stay in the same position from desktop to mobile view 2. All of the buttons are not the same height, any ideas on how to make them all the same size 3. I can not seem to see how to add some padding above the mobile buttons See attached screenshots. Thanks Mark
  5. @@piernas I have solved the issue of the link/button not showing, half of the __construct function was missing :thumbsup: function __construct() { $this->title = MODULE_NAVBAR_EXTRA_SPARE_PARTS_TITLE; $this->description = MODULE_NAVBAR_EXTRA_SPARE_PARTS_DESCRIPTION; if ( defined('MODULE_NAVBAR_EXTRA_SPARE_PARTS_STATUS') ) { $this->sort_order = MODULE_NAVBAR_EXTRA_SPARE_PARTS_SORT_ORDER; $this->enabled = (MODULE_NAVBAR_EXTRA_SPARE_PARTS_STATUS == 'True'); } }
  6. @@milerwan @@frankl yes your right, I had not spotted that.
  7. @@piernas sorry to bug you at this time of year but I dont suppose you have had chance to give your code the once over have you? I have had a go but not sure why it will not display :wacko:
  8. @@milerwan I have it working on my test site thanks to @@frankl and the posts above but I have not yet attempted the seperate admin page. I may attempt it between christmas and new year if I get time away from the family festivities :P
  9. @@piernas I have tried the code above but nothing shows either on desktop or mobile??? Mark
  10. @piernas I still have not worked this out if you woud not mind helping out. Thanks Mark
  11. @@aurelou I can only replicate this problem when viewing the my site using a responsive site tester I have installed in chrome. If I view the site on my Samsung mobile or Lenovo tablet the buttons work ok. How are you viewing your site? Mark
  12. @@greasemonkey yeah done that now thanks, not sure what I was doing wrong lol
  13. @@greasemonkey Sorry to resurrect an old thread but is it possible to get this working with the new products module on the index page? I have tried but it does not seem to change anything Thanks Mark
  14. @piernas ok I think I got the hang of this now. I have created a new module by copying the contact_us module and changed it to what I want. Now the bit I just can not seem to get my head around is how to make the full link I have degrade to just an icon like the search, cart or account link but without the collapsible part. Maybe I am being blind but I just can not see how to do it. Thanks Mark includes/modules/navbar_extra_modules/nbx_spare_parts.php <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2016 osCommerce Released under the GNU General Public License */ class nbx_spare_parts { var $code = 'nbx_spare_parts'; var $group = 'navbar_extra_modules_left'; var $title; var $description; var $sort_order; var $enabled = false; function __construct() { $this->title = MODULE_NAVBAR_EXTRA_SPARE_PARTS_TITLE; $this->description = MODULE_NAVBAR_EXTRA_SPARE_PARTS_DESCRIPTION; if ( defined('MODULE_NAVBAR_EXTRA_SPARE_PARTS_STATUS') ) { $this->sort_order = MODULE_NAVBAR_EXTRA_SPARE_PARTS_SORT_ORDER; $this->enabled = (MODULE_NAVBAR_EXTRA_SPARE_PARTS_STATUS == 'True'); switch (MODULE_NAVBAR_EXTRA_SPARE_PARTS_CONTENT_PLACEMENT) { case 'Home': $this->group = 'navbar_extra_modules_home'; break; case 'Left': $this->group = 'navbar_extra_modules_left'; break; case 'Right': $this->group = 'navbar_extra_modules_right'; break; case 'Buttons': $this->group = 'navbar_extra_modules_buttons'; break; } } } function getOutput() { global $oscTemplate; ob_start(); require('includes/modules/navbar_extra_modules/templates/nbx_spare_parts.php'); $data = ob_get_clean(); $oscTemplate->addBlock($data, $this->group); } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_NAVBAR_EXTRA_SPARE_PARTS_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 New products Module', 'MODULE_NAVBAR_EXTRA_SPARE_PARTS_STATUS', 'True', 'Do you want to add the module to your Navbar?', '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, set_function, date_added) values ('Content Placement', 'MODULE_NAVBAR_EXTRA_SPARE_PARTS_CONTENT_PLACEMENT', 'Left', 'Choose placement.', '6', '1', 'tep_cfg_select_option(array(\'Left\',\'Right\'), ', 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_NAVBAR_EXTRA_SPARE_PARTS_SORT_ORDER', '550', '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_NAVBAR_EXTRA_SPARE_PARTS_STATUS', 'MODULE_NAVBAR_EXTRA_SPARE_PARTS_CONTENT_PLACEMENT', 'MODULE_NAVBAR_EXTRA_SPARE_PARTS_SORT_ORDER'); } } includes/modules/navbar_extra_modules/templates/nbx_spare_parts.php <li><a href="<?= tep_href_link('parts_finder.php?filterid=1') ?>"><i class="fa fa-wrench"></i><span class="hidden-sm"> <?= MODULE_NAVBAR_EXTRA_SPARE_PARTS_PUBLIC_TEXT ?></span></a></li> includes/languages/english/modules/navbar_extra_modules/nbx_spare_parts.php <?php define('MODULE_NAVBAR_EXTRA_SPARE_PARTS_TITLE', 'Spare Parts Finder'); define('MODULE_NAVBAR_EXTRA_SPARE_PARTS_DESCRIPTION', 'Show link to Spare Parts Finder in the navigation bar.'); define('MODULE_NAVBAR_EXTRA_SPARE_PARTS_PUBLIC_TEXT', 'Spare Parts Finder'); //<li><a href="' . tep_href_link('parts_finder.php?filterid=1') . '"><i class="fa fa-wrench"></i><span class="hidden-sm"> Spare Parts Finder</span></a></li>'); define('MODULE_NAVBAR_EXTRA_SPARE_PARTS_SHORT_TEXT', 'Spare Parts Finder'); //<li><a href="' . tep_href_link('parts_finder.php?filterid=1') . '"><i class="fa fa-wrench"></i><span class="hidden-sm"> Spare Parts Finder</span></a></li>');
×