Jump to content

De Dokta

Members
  • Content count

    329
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by De Dokta

  1. @@auzStar Hi Dom No problem! Just upload it - if you've tested it yourself, that's quite enough! If there are multiple versions, the users have the freedom to choose what they prefer. :rolleyes: J.J.
  2. Hi Ralf instead of the new_tables.sql simply use the following sql which bypasses all problems with changed order_ tables: drop table if exists invoice_orders; create table invoice_orders LIKE orders; drop table if exists invoice_orders_products; create table invoice_orders_products LIKE orders_products; drop table if exists invoice_orders_products_attributes; create table invoice_orders_products_attributes LIKE orders_products_attributes; drop table if exists invoice_orders_products_download; create table invoice_orders_products_download LIKE orders_products_download; drop table if exists invoice_orders_total; create table invoice_orders_total LIKE orders_total; J.J. NS. There's already a thread for Invoice Editor. It would be nice if you would use it for further questions on this tool.
  3. Modal Info Popup Layer Creates an info popup with text and/or image on the first page, on which the customer enters the shop. Addon: http://addons.oscommerce.com/info/9204 Support: http://forums.oscommerce.com/topic/399738-modal-info-popup-layer-for-osc-234bs/#entry1713770
  4. De Dokta

    Modal Info Popup Layer for osc 2.3.4BS

    Hi John Yes the popup should be displayed only once when a customer for the first time enters the shop. It would be annoying if the message would pop up on every page load or refresh! :x If you have stored different popups activate the one you want to be displayed by clicking the green button on the popup overview page. Only one popup can be active. J.J.
  5. De Dokta

    Modal Info Popup Layer for osc 2.3.4BS

    Popup status is needed for the schedule and expire function. I found when changing to SSL (e.g. Login) the popup appears in certain browsers again and then it's impossible to login. :wacko: So I disabled the popup in SSL. J.J.
  6. De Dokta

    Modal Info Popup Layer for osc 2.3.4BS

    Thanks for the hint. Fixed!
  7. De Dokta

    Modal Info Popup Layer for osc 2.3.4BS

    New version uploaded with the changes proposed by multimixer - now no more files must be changed: Upload it to your shop, install it in your admin - done! Many thanks to multimixer for the right tip! (w00t) J.J.
  8. De Dokta

    Modal Info Popup Layer for osc 2.3.4BS

    One never stops learning! (w00t) Thank you for that. J.J.
  9. You are right. Remove in bm_whats_new_scroller.php line 61: $wn .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $randoms_product["products_id"]) . '">'.tep_image_button("button_details.gif").'</a>'; I give it up for today! Seems that I'm too tired to bring about something reasonable... :blush:
  10. @@grandpaj Don't hesitate to ask if you have problems.. :) The number of new products displayed in the scroller is defined by Admin -> Configuration -> Maximum Values -> Selection of Random New Products. To increase the number of products shown at the same time would mean to change the script or to write a new one :wacko: ....... J.J.
  11. @@grandpaj I'll do my best, if I find the time! But why don't you try it yourself? Take the specials files from the contrib that Auzstar created and compare it with my new products files. Then you will see what to do. The difference is not that big. J.J.
  12. @@grandpaj Sorry, my mistake: :x bm_whats_new_scroller.php: <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2015 osCommerce Released under the GNU General Public License */ class bm_whats_new_scroller { var $code = 'bm_whats_new_scroller'; var $group = 'boxes'; var $title; var $description; var $sort_order; var $enabled = false; function bm_whats_new_scroller() { $this->title = MODULE_BOXES_WHATS_NEW_SCROLLER_TITLE; $this->description = MODULE_BOXES_WHATS_NEW_SCROLLER_DESCRIPTION; if ( defined('MODULE_BOXES_WHATS_NEW_SCROLLER_STATUS') ) { $this->sort_order = MODULE_BOXES_WHATS_NEW_SCROLLER_SORT_ORDER; $this->enabled = (MODULE_BOXES_WHATS_NEW_SCROLLER_STATUS == 'True'); $this->group = ((MODULE_BOXES_WHATS_NEW_SCROLLER_CONTENT_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right'); } } function execute() { global $oscTemplate, $languages_id, $currencies, $valuein, $valueout; $wn_query = tep_db_query(" select p.products_id, pd.products_name, pd.products_description, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price, s.status from " . TABLE_PRODUCTS . " p join " . TABLE_PRODUCTS_DESCRIPTION . " pd on pd.products_id = p.products_id left join " . TABLE_SPECIALS . " s on s.products_id = p.products_id where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int) $languages_id . "' order by p.products_date_added desc limit " . MAX_RANDOM_SELECT_NEW); if (tep_db_num_rows($wn_query)) { while ($randoms_product = tep_db_fetch_array($wn_query)) { $wn .= '<li>'; if ($randoms_product['status'] == 1) { $p_price = '<s>' . $currencies->display_price($randoms_product['products_price'], tep_get_tax_rate($randoms_product['products_tax_class_id'])) . '</s> '; $p_price .= '<span class="productSpecialPrice">' . $currencies->display_price($randoms_product['specials_new_products_price'], tep_get_tax_rate($randoms_product['products_tax_class_id'])) . '</span>'; } else { $p_price = $currencies->display_price($randoms_product['products_price'], tep_get_tax_rate($randoms_product['products_tax_class_id'])); } $wn .= '<p class="text-center"><br /><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $randoms_product['products_id']) . '">' . $randoms_product['products_name'] . '</a></p>'; $wn .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $randoms_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $randoms_product['products_image'], $randoms_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, NULL, NULL, 'img-responsive thumbnail') . '</a>'; if(MODULE_BOXES_WHATS_NEW_SCROLLER_DESC != '0') { $wn .= '<p class="text-center">' . substr(strip_tags($randoms_product['products_description']), 0, MODULE_BOXES_WHATS_NEW_SCROLLER_DESC). '...<br /></p>'; } $wn .= '<p class="text-center">' . $p_price . '</p>'; $wn .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $randoms_product["products_id"]) . '">'.tep_image_button("button_details.gif").'</a>'; $wn .= '<p class="text-center">' .tep_draw_button(SMALL_IMAGE_BUTTON_VIEW, '', tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $randoms_product["products_id"]), '', '', 'btn-success btn-sm') . '</p>'; $wn .= '</li>'; } $direction = MODULE_BOXES_WHATS_NEW_SCROLLER_DIRECTION; if($direction == 'up') { $valuein = '1'; $valueout = '-1'; }else{ $valuein = '-1'; $valueout = '1'; } $wn .='<script src="ext/jquery/jquery.scroller.min.js"></script>'; $wn .= '<script>$("#whats_new").scroller({ directionIn :' .$valuein .', directionOut:' .$valueout .', pause:' . MODULE_BOXES_WHATS_NEW_SCROLLER_DELAY. ', transition:'. MODULE_BOXES_WHATS_NEW_SCROLLER_SPEED .', height:' . MODULE_BOXES_WHATS_NEW_SCROLLER_HEIGHT .'});</script>'; ob_start(); include(DIR_WS_MODULES . 'boxes/templates/whats_new_scroller.php'); $data = ob_get_clean(); $oscTemplate->addBlock($data, $this->group); } } function isEnabled() { global $PHP_SELF; if($PHP_SELF !== 'products_new.php') { return $this->enabled; } } function check() { return defined('MODULE_BOXES_WHATS_NEW_SCROLLER_STATUS'); } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable What\'s New Module', 'MODULE_BOXES_WHATS_NEW_SCROLLER_STATUS', 'True', 'Do you want to add the module to your shop?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Placement', 'MODULE_BOXES_WHATS_NEW_SCROLLER_CONTENT_PLACEMENT', 'Left Column', 'Should the module be loaded in the left or right column?', '6', '2', 'tep_cfg_select_option(array(\'Left Column\', \'Right Column\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_BOXES_WHATS_NEW_SCROLLER_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '3', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Scroll Direction', 'MODULE_BOXES_WHATS_NEW_SCROLLER_DIRECTION', 'up', 'Change Scroller Direction', '6', '4', 'tep_cfg_select_option(array(\'up\', \'down\'), ',now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Scroller Height', 'MODULE_BOXES_WHATS_NEW_SCROLLER_HEIGHT', '260', 'Change Scroller Height, default: 260 px', '6', '5', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Scroller Transition Speed', 'MODULE_BOXES_WHATS_NEW_SCROLLER_SPEED', '1500', 'Change Scroller Transition Speed in ms, default: 1500 (Value MUST be smaller than Scroller Pause', '6', '6', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Scroller Pause', 'MODULE_BOXES_WHATS_NEW_SCROLLER_DELAY', '2000', 'Change Scroller Pause in ms, default: 2000', '6', '7', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Description Length', 'MODULE_BOXES_WHATS_NEW_SCROLLER_DESC', '20', 'Display part of products description, default: 50 (0 = No description)', '6', '8', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_BOXES_WHATS_NEW_SCROLLER_STATUS', 'MODULE_BOXES_WHATS_NEW_SCROLLER_CONTENT_PLACEMENT', 'MODULE_BOXES_WHATS_NEW_SCROLLER_SORT_ORDER', 'MODULE_BOXES_WHATS_NEW_SCROLLER_DIRECTION', 'MODULE_BOXES_WHATS_NEW_SCROLLER_HEIGHT', 'MODULE_BOXES_WHATS_NEW_SCROLLER_SPEED', 'MODULE_BOXES_WHATS_NEW_SCROLLER_DELAY', 'MODULE_BOXES_WHATS_NEW_SCROLLER_DESC'); } } ?> Line 56 is: $wn .= '<p class="text-center">' . substr(strip_tags($randoms_product['products_description']), 0, SCROLLER_DESC). '...<br /></p>'; must be: $wn .= '<p class="text-center">' . substr(strip_tags($randoms_product['products_description']), 0, MODULE_BOXES_WHATS_NEW_SCROLLER_DESC). '...<br /></p>'; jquery Scroll Box.zip J.J.
  13. Ok, since I'm not really satisfied with the marquee version, I've tried something else with jquery. ext/jquery/ add a new file jquery.scroller.min.js: (function($){$.fn.scroller=function(options) {var that=this;$(window).load(function() {var settings={transition:750,pause:5000,directionIn:1,directionOut:-1,height:150,}; if(options)$.extend(settings,options); var featuresWidth=that.width(),ul=that.find("ul"),li=ul.find("li"),liWidth=li.width(),t=undefined,on=false; that.css({overflow:"hidden"});li.hide().first().show(); var featuresHeight=ul.height(); ul.css({width:featuresWidth+"px",position:"relative",height:settings.height+"px"}); var position=li.first().position();li.css({position:"absolute",width:liWidth+"px"}); var loop=function(){if(on)return;on=true; var li=that.find("li"),first=li.first(),next=first.next(); first.css("top",position.top+"px").show().clone().hide().insertAfter(li.last()); next.css({"top":settings.directionIn*featuresWidth+"px",opacity:0}).show(); first.animate({opacity:0,top:settings.directionOut*featuresWidth+"px"},settings.transition,function(){$(this).remove();}); next.animate({opacity:1,top:position.top+"px",},settings.transition); setTimeout(function(){on=false;},settings.transition); if(t) t=setTimeout(function(){loop();},settings.pause);} that.hover(function(){clearTimeout(t);t=undefined;},function(){t=setTimeout(function(){loop();},settings.transition);});t=setTimeout(function(){loop();},settings.pause);});return this;};})(jQuery); ...modules/boxes/bm_whats_new_scroller.php changed to: <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ class bm_whats_new_scroller { var $code = 'bm_whats_new_scroller'; var $group = 'boxes'; var $title; var $description; var $sort_order; var $enabled = false; function bm_whats_new_scroller() { $this->title = MODULE_BOXES_WHATS_NEW_SCROLLER_TITLE; $this->description = MODULE_BOXES_WHATS_NEW_SCROLLER_DESCRIPTION; if ( defined('MODULE_BOXES_WHATS_NEW_SCROLLER_STATUS') ) { $this->sort_order = MODULE_BOXES_WHATS_NEW_SCROLLER_SORT_ORDER; $this->enabled = (MODULE_BOXES_WHATS_NEW_SCROLLER_STATUS == 'True'); $this->group = ((MODULE_BOXES_WHATS_NEW_SCROLLER_CONTENT_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right'); } } function execute() { global $oscTemplate, $languages_id, $currencies, $valuein, $valueout; $wn_query = tep_db_query(" select p.products_id, pd.products_name, pd.products_description, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price, s.status from " . TABLE_PRODUCTS . " p join " . TABLE_PRODUCTS_DESCRIPTION . " pd on pd.products_id = p.products_id left join " . TABLE_SPECIALS . " s on s.products_id = p.products_id where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int) $languages_id . "' order by p.products_date_added desc limit " . MAX_RANDOM_SELECT_NEW); if (tep_db_num_rows($wn_query)) { while ($randoms_product = tep_db_fetch_array($wn_query)) { $wn .= '<li>'; if ($randoms_product['status'] == 1) { $p_price = '<s>' . $currencies->display_price($randoms_product['products_price'], tep_get_tax_rate($randoms_product['products_tax_class_id'])) . '</s> '; $p_price .= '<span class="productSpecialPrice">' . $currencies->display_price($randoms_product['specials_new_products_price'], tep_get_tax_rate($randoms_product['products_tax_class_id'])) . '</span>'; } else { $p_price = $currencies->display_price($randoms_product['products_price'], tep_get_tax_rate($randoms_product['products_tax_class_id'])); } $wn .= '<p class="text-center"><br /><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $randoms_product['products_id']) . '">' . $randoms_product['products_name'] . '</a></p>'; $wn .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $randoms_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $randoms_product['products_image'], $randoms_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, NULL, NULL, 'img-responsive thumbnail') . '</a>'; if(MODULE_BOXES_WHATS_NEW_SCROLLER_DESC != '0') { $wn .= '<p class="text-center">' . substr(strip_tags($randoms_product['products_description']), 0, SCROLLER_DESC). '...<br /></p>'; } $wn .= '<p class="text-center">' . $p_price . '</p>'; $wn .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $randoms_product["products_id"]) . '">'.tep_image_button("button_details.gif").'</a>'; $wn .= '<p class="text-center">' .tep_draw_button(SMALL_IMAGE_BUTTON_VIEW, '', tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $randoms_product["products_id"]), '', '', 'btn-success btn-sm') . '</p>'; $wn .= '</li>'; } $direction = MODULE_BOXES_WHATS_NEW_SCROLLER_DIRECTION; if($direction == 'up') { $valuein = '1'; $valueout = '-1'; }else{ $valuein = '-1'; $valueout = '1'; } $wn .='<script src="ext/jquery/jquery.scroller.min.js"></script>'; $wn .= '<script>$("#whats_new").scroller({ directionIn :' .$valuein .', directionOut:' .$valueout .', pause:' . MODULE_BOXES_WHATS_NEW_SCROLLER_DELAY. ', transition:'. MODULE_BOXES_WHATS_NEW_SCROLLER_SPEED .', height:' . MODULE_BOXES_WHATS_NEW_SCROLLER_HEIGHT .'});</script>'; ob_start(); include(DIR_WS_MODULES . 'boxes/templates/whats_new_scroller.php'); $data = ob_get_clean(); $oscTemplate->addBlock($data, $this->group); } } function isEnabled() { global $PHP_SELF; if($PHP_SELF !== 'products_new.php') { return $this->enabled; } } function check() { return defined('MODULE_BOXES_WHATS_NEW_SCROLLER_STATUS'); } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable What\'s New Module', 'MODULE_BOXES_WHATS_NEW_SCROLLER_STATUS', 'True', 'Do you want to add the module to your shop?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Placement', 'MODULE_BOXES_WHATS_NEW_SCROLLER_CONTENT_PLACEMENT', 'Left Column', 'Should the module be loaded in the left or right column?', '6', '2', 'tep_cfg_select_option(array(\'Left Column\', \'Right Column\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_BOXES_WHATS_NEW_SCROLLER_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '3', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Scroll Direction', 'MODULE_BOXES_WHATS_NEW_SCROLLER_DIRECTION', 'up', 'Change Scroller Direction', '6', '4', 'tep_cfg_select_option(array(\'up\', \'down\'), ',now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Scroller Height', 'MODULE_BOXES_WHATS_NEW_SCROLLER_HEIGHT', '260', 'Change Scroller Height, default: 260 px', '6', '5', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Scroller Transition Speed', 'MODULE_BOXES_WHATS_NEW_SCROLLER_SPEED', '1500', 'Change Scroller Transition Speed in ms, default: 1500 (Value MUST be smaller than Scroller Pause', '6', '6', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Scroller Pause', 'MODULE_BOXES_WHATS_NEW_SCROLLER_DELAY', '2000', 'Change Scroller Pause in ms, default: 2000', '6', '7', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Description Length', 'MODULE_BOXES_WHATS_NEW_SCROLLER_DESC', '20', 'Display part of products description, default: 50 (0 = No description)', '6', '8', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_BOXES_WHATS_NEW_SCROLLER_STATUS', 'MODULE_BOXES_WHATS_NEW_SCROLLER_CONTENT_PLACEMENT', 'MODULE_BOXES_WHATS_NEW_SCROLLER_SORT_ORDER', 'MODULE_BOXES_WHATS_NEW_SCROLLER_DIRECTION', 'MODULE_BOXES_WHATS_NEW_SCROLLER_HEIGHT', 'MODULE_BOXES_WHATS_NEW_SCROLLER_SPEED', 'MODULE_BOXES_WHATS_NEW_SCROLLER_DELAY', 'MODULE_BOXES_WHATS_NEW_SCROLLER_DESC'); } } ?> and modules/boxes/templates/whats_new_scroller.php to: <div class="panel panel-default"> <div class="panel-heading"><a href="<?php echo tep_href_link('products_new.php') . '">' . MODULE_BOXES_WHATS_NEW_SCROLLER_BOX_TITLE; ?></a></div> <div id="whats_new" class="panel-body" style="padding:0;"> <ol style="list-style:none;padding-left: 0;"> <?php echo '<center>' . $wn .'</center>'; ?> </ol> </div> </div> includes/languages/your_language/modules/bm_whats_new_scroller.php - no changes. You can see the difference between the two approaches here - New Products with jquery, Specials with marquee. And if someone want to try it: jquery Scroll Box.zip - contains only files for New Products Scroll Box. Installation is simple: Upload files to the appropriate folders, install the module in Admin -> Modules -> Boxes, configure it to your need - ready! J.J.
  14. @@root123 @@auzStar Just an attempt on the fly as an example for the specials scroller. :rolleyes: Tested in bootstrap gold. includes/modules/boxes add a new file bm_specials_scroller.php: <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2015 osCommerce Released under the GNU General Public License created: O.F.Y. - osCommerce for You http://www.oscommerceforyou.hu email: info@oscommerceforyou.hu */ class bm_specials_scroller { var $code = 'bm_specials_scroller'; var $group = 'boxes'; var $title; var $description; var $sort_order; var $enabled = false; function bm_specials_scroller() { $this->title = MODULE_BOXES_SPECIALS_SCROLLER_TITLE; $this->description = MODULE_BOXES_SPECIALS_SCROLLER_DESCRIPTION; if ( defined('MODULE_BOXES_SPECIALS_SCROLLER_STATUS') ) { $this->sort_order = MODULE_BOXES_SPECIALS_SCROLLER_SORT_ORDER; $this->enabled = (MODULE_BOXES_SPECIALS_SCROLLER_STATUS == 'True'); $this->group = ((MODULE_BOXES_SPECIALS_SCROLLER_CONTENT_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right'); } } function execute() { global $_GET, $languages_id, $currencies, $oscTemplate; $rp_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and p.products_id = s.products_id and pd.products_id = s.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added desc"); if (tep_db_num_rows($rp_query)) { while ($random_product = tep_db_fetch_array($rp_query)) { $rp .= '<p class="text-center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a></p>'; $rp .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, NULL, NULL, 'img-responsive thumbnail') . '</a>'; if(SCROLL_DESC != '0') { $rp .= '<p class="text-center">' . substr(strip_tags($random_product['products_description']), 0, SCROLL_DESC). '...<br /></p>'; } $rp .= '<p class="text-center"><s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br /> <span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) .'</p>'; $rp .= '<p class="text-center">' .tep_draw_button(SMALL_IMAGE_BUTTON_VIEW, '', tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product["products_id"]), '', '', 'btn-success btn-sm') . '</p>'; $rp .= '<hr />'; } ob_start(); include(DIR_WS_MODULES . 'boxes/templates/specials_scroller.php'); $data = ob_get_clean(); $oscTemplate->addBlock($data, $this->group); } } function isEnabled() { global $PHP_SELF; if($PHP_SELF !== 'specials.php') { return $this->enabled; } } function check() { return defined('MODULE_BOXES_SPECIALS_SCROLLER_STATUS'); } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Specials Module', 'MODULE_BOXES_SPECIALS_SCROLLER_STATUS', 'True', 'Do you want to add the module to your shop?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Placement', 'MODULE_BOXES_SPECIALS_SCROLLER_CONTENT_PLACEMENT', 'Left Column', 'Should the module be loaded in the left or right column?', '6', '1', 'tep_cfg_select_option(array(\'Left Column\', \'Right Column\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_BOXES_SPECIALS_SCROLLER_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '2', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Scroll Direction', 'SCROLL_DIRECTION', 'up', 'Change Scroller Direction', '6', '2', 'tep_cfg_select_option(array(\'up\', \'down\'), ',now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Scroll Height', 'SCROLL_HEIGHT', '260', 'Change Scroller Height, default: 260 px', '6', '3', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Scroll Speed', 'SCROLL_SPEED', '2', 'Change Scroller Speed, default: 2', '6', '4', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Scroll Delay', 'SCROLL_DELAY', '20', 'Change Scroller Delay, default: 20', '6', '5', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Description Length', 'SCROLL_DESC', '20', 'Display part of products description, default: 50 (0 = No description)', '6', '6', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_BOXES_SPECIALS_SCROLLER_STATUS', 'MODULE_BOXES_SPECIALS_SCROLLER_CONTENT_PLACEMENT', 'MODULE_BOXES_SPECIALS_SCROLLER_SORT_ORDER', 'SCROLL_DIRECTION', 'SCROLL_HEIGHT', 'SCROLL_SPEED', 'SCROLL_DELAY', 'SCROLL_DESC'); } } ?> includes/modules/boxes/templates add a new file specials_scroller.php: <div class="panel panel-default hidden-xs hidden-sm"> <div class="panel-heading"><a href="<?php echo tep_href_link('specials.php') . '">' . MODULE_BOXES_SPECIALS_SCROLLER_BOX_TITLE; ?></a></div> <div class="panel-body text-center"> <?php echo '<MARQUEE behavior= "scroll" direction= "' . SCROLL_DIRECTION . '" height="' . SCROLL_HEIGHT . '" scrollamount= "' . SCROLL_SPEED . '" scrolldelay= "' . SCROLL_DELAY . '" onmouseover=\'this.stop()\' onmouseout=\'this.start()\'>'.$rp.'</MARQUEE>'; ?> </div> </div> includes/languages/Your Language(s)/modules/boxes add a new file bm_specials_scroller.php: <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2014 osCommerce Released under the GNU General Public License */ define('MODULE_BOXES_SPECIALS_SCROLLER_TITLE', 'Specials Scroller'); define('MODULE_BOXES_SPECIALS_SCROLLER_DESCRIPTION', 'Install Specials Scroll Box'); define('MODULE_BOXES_SPECIALS_SCROLLER_BOX_TITLE', 'Specials'); Install it in your admin -> modules -> boxes, configure it to your needs and have fun! (w00t) In collapsed view the scroller is hidden. If you want to display it even in collapsed view remove the hidden-xs hidden-sm tags from includes/modules/boxes/templates/specials_scroller.php. J.J.
  15. De Dokta

    Master Products - MS2

    @@Tsimi Hi Lambros Yes, you are right - apart from the conversion in BS, there is no big difference to standard Osc. The only (for me) something difficult enhancement was the conversion of the Ajax price update contrib, so that also prices of slaves are automatically updated.when the customer selects options. And yes, in that form it is commercial. But if I find the time, I will build it up again into an unmodified BS shop - without the gimmicks - and upload to the addon area. :D But for that I need to familiarize myself with the gold version. J.J.
  16. De Dokta

    Master Products - MS2

    Ah! ça ira - as you can see here. (w00t)
  17. Hi, just tested it on your demo site. I have logged in with a Google account. Works flawlessly! But: In this Google account, only my email address is stored. After login with the tool I can go through the checkout process without having my name and my address stored somewhere. What does a shop owner do when an order comes in, where he has only an email address of the customer? Wouldn't it be better to add a routine to the tool, which verifies that all address details required for an order are available and if necessary ask customers to complement them? J.J.
  18. De Dokta

    Invoice Editor 1.0

    @@benwijns And if you create a pdf invoice (button 'Invoice PDF' in edit_invoice or if you display a single order) - is the num_invoice stored properly in table orders?
  19. De Dokta

    Invoice Editor 1.0

    @@benwijns I installed this contrib in several shops (2.2.MS2, 2.3.1. 2.34 and 2.3.4BS) and it works fine with any of these osc versions. So, there's NO bug. If it does not work for you, you made a mistake during installation. I guess that either the column "num_invoice" in table "orders" does not exist, or the invoice number is not correctly written into this column. Then you can not save the invoice and if the invoice is not saved, you can not attach it to a message. Is the file admin\includes\functions\invoice_num.php in place? J.J.
  20. De Dokta

    Invoice Editor 1.0

    Thanks for the note! I forgot to mention that. :blush: :-
  21. De Dokta

    Invoice Editor 1.0

    @@benwijns No sorry, pdf files can not be styled using css. You must open the files e.g. invoice_editor_pdf.php and change it according to your needs. A lot of tips how to work with fpdf you can find here Did you create a new folder to save your invoices e.g. admin/invoice? Did you set the permission of this folder to chmod 777 or at least 755? Did you set in Admin -> Configuration -> Invoice Editor ' Save invoices?' to true, and did you enter the location of your invoice folder in Admin -> Configuration -> Invoice Editor 'Storage directory' ? J.J.
  22. @@ArtcoInc "Shipping Quote in cart" means Shipping Quote in CART! Your screenshot doesn't show the shopping cart, but the product info. This is NOT the shipping calculator, this is the shipping info modal from "tax info and shipping" (obligatory in Germany! :x ) Put something into your shopping cart (buy or add to cart button), call the shopping cart where you now find a button Shipping Calculator. Et violà! And you don't need to log in! J.J.
  23. Hi I couldn't stop thinking about this issue. I love Lambros' idea with the shipping-modal, but without a correct calculation of the tax it is of no use for me. So, I've tried myself to find a solution. And with some copy'n paste :- and some ajax code I finally got one. Installation is simple: shopping_cart.php: after: <div class="buttonSet"> <span class="buttonAction"> add : <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#quotesModal"><?php echo GET_QUOTES; ?></button> before: require(DIR_WS_INCLUDES . 'template_bottom.php'); add: include(DIR_WS_MODULES . 'shipping_in_cart.php'); includes/languages/your_language(s)/shopping_cart.php insert: german: define('GET_QUOTES', 'Versandkosten-Rechner'); define('GET_QUOTES_TITLE', 'Versandkosten-Rechner'); define('TEXT_DELIVERY_STATE', 'Bestimmungsland: '); define('TEXT_DELIVERY_TRANSPORT', 'Versandart: '); define('TEXT_FREE_SHIPPING', 'Versand kostenlos'); english: define('GET_QUOTES', 'Shipping Calculator'); define('GET_QUOTES_TITLE', 'Shipping Calculator'); define('TEXT_DELIVERY_STATE', 'Destination Country: '); define('TEXT_DELIVERY_TRANSPORT', 'Shipping Method: '); define('TEXT_FREE_SHIPPING', 'Shipping free'); get_shipping_quotes.php shipping_in_cart.php Copy the file shipping_in_cart.php into the folder catalog/includes/modules Copy the file get_shipping_quotes.php into the catalog folder I beg for leniency, that the code is partially still somewhat sloppy. What's still missing is a routine that automatically selects the country of logged-in customers. Currently, always the store country is chosen on the first call. I guess it's no big deal! Demo here Thoughts? J.J.
  24. De Dokta

    Invoice Editor 1.0

    Hi Just checked your general.php in my testshop and could not reproduce your problem. So I would say your general.php is ok. There are two buttons to open the invoice editor. One on the right column of your orders overview (orders.php), the other, when you open a single order. Does one of these buttons start the invoice editor? If not, is the file admin/edit_invoice_process.php in place and did you register this file into your admin/includes/filenames.php? Yes, it is in principle possible to send an invoice with the order confirmation - but not with this tool. I remember a discussion in the German forum how to create a pdf invoice on the fly and to attach it to the confirmation mail. There may be a similar discussion somewhere here in the forum. I have not built such a function, because this is something problematic in Germany for accounting reasons. (We have a lot of rules and regulations here! :x ) J.J.
  25. De Dokta

    Invoice Editor 1.0

    @@ArtcoInc Do you have more than 999999 invoices? :P Or do you expect any time soon to exceed this limit? Then you may change the num_invoice field from int(6) to int(7), 8, 10, 100 or whatever you want........ "%02u" adds a leading zero for single-digit numbers. I just think it looks better. :- The German laws do not say that I must start the counting of invoices each year with 1 - they only say that every invoice number must be unique. But since I built the invoice editor for our shop and I think it is clear when I start every year again with the invoice number 1, I just decided to chose this way. Our invoice numbers consist of a prefix, the counter, the current month and the current year e.g. VS25/022014. In this way, I can assign each invoice at a glance a month and year! The mentioned invoice number for example tells me that it was the 25. invoice of the year 2014 and was created in February. And the prefix tells me that it was a sale in our online shop. -_- J.J.
×