Jump to content

PupStar

Members
  • Content count

    896
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by PupStar

  1. I have started the process of converting this addon to work with bootstrap edge http://addons.oscommerce.com/info/8590 I have started the conversion and at a point now where I am struggling. Known errors so far. 1. Box module not displaying data in dropdowns 2. admin > categories has issues with deletion routine 3. when adding new data in categories.php all fields are filled in the database except 'products_car_part' The files in the attached zip file are ready to drop into a clean install of BS Edge. I have included a text file with the sql to run in your database. * DO NOT DROP ONTO LIVE STORE OR ANYSTORE YOU DO NOT WANT TO BREAK OR HAVE MODIFIED * Is anyone willing to help out with the errors and get this to a releasable addon. Thanks Mark Year Make Model Bootstrap.zip
  2. @@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
  3. @@piernas Thanks for getting back to me. I will have a look at the code and report back
  4. @@piernas still not resolved issue 1 and 2 above, any chance you could revisit and advise? Thanks Mark
  5. @@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
  6. @@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'); } }
  7. @@milerwan @@frankl yes your right, I had not spotted that.
  8. @@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:
  9. @@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
  10. @@piernas I have tried the code above but nothing shows either on desktop or mobile??? Mark
  11. @piernas I still have not worked this out if you woud not mind helping out. Thanks Mark
  12. @@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
  13. @@greasemonkey yeah done that now thanks, not sure what I was doing wrong lol
  14. @@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
  15. @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>');
  16. @@piernas ok I sorted it. instead of having a 'content/navigation' folder I copied the cm_navbar_extra.php file into the content/header folder and it worked. I must have made a mistake earlier when doing that so now it works.
  17. @@piernas I moved the original navbar from 'includes/modules/navbar_modules' into 'includes/modules/content/header' so the navbar was constrained to the width of the body and not taking the full page width to fit with my design. That is what I also want to do with your new navbar, does that make more sense? Mark
  18. @@piernas I need to have these modules inside the 'header' so the width is constrained to the width of the store and not full page width. Is it just a simple case of moving to the header module folder or would it require more than that. I have been playing with this but keep breaking it lol Thanks Mark
  19. @@Omar_one unfortunately I have never done a database conversion so I can not really help, sorry
  20. @@Omar_one this maybe a daft question but why are you upgrading and not just install the responsive version?
  21. @@Omar_one then it definately looks like a coding error
  22. have you made any changes to the store or is it a stock install? The usual culprits are .htacces, permissions or coding mistake. a bit more info is needed.
  23. @@Dan Cole Cheers mate as soon as I saw the query again I knew what I had done wrong, the query now looks like this // We show them all $listing_sql = "select " . $select_column_list . " p.products_id, SUBSTRING_INDEX(pd.products_description, ' ', 20) as products_description, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p.products_id = p2c.products_id left join " . TABLE_CATEGORIES . " c using(categories_id) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where c.categories_status = '1' and p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'"; } and thanks for the top top in breaking it down to be more manageable :thumbsup: Mark
  24. I have added this addon http://addons.oscommerce.com/info/5907 to give me the ability to hide categories from certain parts of the store I am struggling with integrating this with products_new.php and also the manufacturers box. Can anyone point me in the right direction of which category query to add 'and categories_status = 1' to as I have tried the ones I can find but with no change. I am now think I need to add an extra query or am I over thinking ? Thanks Mark
×