Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

milerwan

Members
  • Posts

    363
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by milerwan

  1. In "Ultimate_SEO_URLSv22d_14" for BS version, in seo_class.php file, I have found a small error that causes mysqli error when refresh the catalog page, just after resetting SEO URL Cache from admin . In line 152, found : function Free($resource_id){ return mysqli_free_result($resource_id); } # end function and change it by : function Free($resource_id){ return @mysqli_free_result($resource_id); } # end function Moreover, I met a strange problem with newsdesk rewriting article name and special caracter conversion... Here is my typist entry : Enter special character conversions ?=>,&=>,é=>e,è=>e,ê=>e,ë=>e,à=>a,á=>a,â=>a,î=>i,ç=>c All the special caracters mentioned are changed succesfully BUT if there a special character "à" preceded by a space in the name of the article, the page doesn't load at all ! Oddly, when there is no space before, there is no matter (?!?). for example : - "xxx à xxx" => "xxx-a-xxx" = URL is created but page doesn't load - "xxxàxxx" => "xxxaxxx" = URL is created and page loading is OK - "à xxx" => "a-xxx" = URL is created and page loading is OK - "à à xxx" => "a-a-xxx" => URL is created but page doesn't load This bug occurs only for the special character "à" and no to others "é", "â", etc... Anyone know where this may come?
  2. Here are the main files to have search bar in navbar. It works but I personally have given up using it and I kept it in the content area to keep clean navbar. includes/modules/navbar_modules/nb_store_search.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 nb_store_search { var $code = 'nb_store_search'; var $group = 'navbar_modules_home'; var $title; var $description; var $sort_order; var $enabled = false; function nb_store_search() { $this->title = MODULE_NAVBAR_STORE_SEARCH_TITLE; $this->description = MODULE_NAVBAR_STORE_SEARCH_DESCRIPTION; if ( defined('MODULE_NAVBAR_STORE_SEARCH_STATUS') ) { $this->sort_order = MODULE_NAVBAR_STORE_SEARCH_SORT_ORDER; $this->enabled = (MODULE_NAVBAR_STORE_SEARCH_STATUS == 'True'); switch (MODULE_NAVBAR_STORE_SEARCH_PLACEMENT) { case 'Home': $this->group = 'navbar_modules_home'; break; case 'Left': $this->group = 'navbar_modules_left'; break; case 'Right': $this->group = 'navbar_modules_right'; break; } } } function getOutput() { global $request_type, $oscTemplate; $search_box = tep_navbar_store_search('btn-info', (MODULE_NAVBAR_STORE_SEARCH_FUNCTIONS == 'Descriptions')); // define typeahead scripts $script = '<script src="' . tep_href_link('ext/bootstrap-plugins/typeahead/bootstrap3-typeahead.min.js', null, $request_type) . '"></script>'; $script .= '<script src="' . tep_href_link('ext/modules/content/header/store_search/content_searches.min.js', null, $request_type) . '"></script>'; $oscTemplate->addBlock($script, 'footer_scripts'); ob_start(); require(DIR_WS_MODULES . 'navbar_modules/templates/store_search.php'); $data = ob_get_clean(); $oscTemplate->addBlock($data, $this->group); } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_NAVBAR_STORE_SEARCH_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 Search Module', 'MODULE_NAVBAR_STORE_SEARCH_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 configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Placement', 'MODULE_NAVBAR_STORE_SEARCH_PLACEMENT', 'Left', 'Should the module be loaded in the Left or Right or the Home area of the Navbar?', '6', '1', 'tep_cfg_select_option(array(\'Left\', \'Right\', \'Home\'), ', 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 ('Enable Extended Store Search Functions', 'MODULE_NAVBAR_STORE_SEARCH_FUNCTIONS', 'Standard', 'Do you want to enable search function in descriptions?', '6', '1', 'tep_cfg_select_option(array(\'Standard\', \'Descriptions\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Pages', 'MODULE_NAVBAR_STORE_SEARCH_PAGES', '" . implode(';', $this->get_default_pages()) . "', 'The pages to add the Store Search\'s results.', '6', '0', 'nb_store_search_show_pages', 'nb_store_search_pages(', 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_NAVBAR_STORE_SEARCH_SORT_ORDER', '520', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_NAVBAR_STORE_SEARCH_STATUS', 'MODULE_NAVBAR_STORE_SEARCH_PLACEMENT', 'MODULE_NAVBAR_STORE_SEARCH_FUNCTIONS', 'MODULE_NAVBAR_STORE_SEARCH_PAGES', 'MODULE_NAVBAR_STORE_SEARCH_SORT_ORDER'); } function get_default_pages() { return array( 'shipping.php', 'contact_us.php', 'conditions.php', 'cookie_usage.php', 'privacy.php', 'login.php', 'address_book.php', 'create_account.php', 'account_history.php', 'advanced_search.php', 'products_new.php', 'reviews.php', 'ssl_check.php', 'specials.php', 'shopping_cart.php'); } } function tep_navbar_store_search($btnclass ='btn-default', $description = true) { global $request_type; $search_link = '<div class="searchbox-margin">'; $search_link .= tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', $request_type, false), 'get', 'class="form-horizontal"'); $search_link .= ' <div class="input-group">' . tep_draw_input_field('keywords', '', 'required placeholder="' . MODULE_NAVBAR_STORE_SEARCH_PLACEHOLDER . '" id="quick_search" data-provide="typeahead" autocomplete="off" style="margin-right:-2px;"', 'search') . ' <span class="input-group-btn"><button type="submit" class="btn ' . $btnclass .'" style="border-top-left-radius: 0px; border-bottom-left-radius: 0px;"><i class="fa fa-search"></i></button></span>'; if (tep_not_null($description) && ($description === true)) { $search_link .= tep_draw_hidden_field('search_in_description', '1'); } $search_link .= ' </div>'; $search_link .= '</div>'; $search_link .= tep_hide_session_id() . '</form>'; return $search_link; } function nb_store_search_show_pages($text) { return nl2br(implode("\n", explode(';', $text))); } function nb_store_search_pages($values, $key) { global $PHP_SELF; $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.')); $files_array = array(); if ($dir = @[member='dir'](DIR_FS_CATALOG)) { while ($file = $dir->read()) { if (!is_dir(DIR_FS_CATALOG . $file)) { if (substr($file, strrpos($file, '.')) == $file_extension) { $files_array[] = $file; } } } sort($files_array); $dir->close(); } $values_array = explode(';', $values); $output = ''; foreach ($files_array as $file) { $output .= tep_draw_checkbox_field('nb_store_search_file[]', $file, in_array($file, $values_array)) . ' ' . tep_output_string($file) . '<br />'; } if (!empty($output)) { $output = '<br />' . substr($output, 0, -6); } $output .= tep_draw_hidden_field('configuration[' . $key . ']', '', 'id="htrn_files"'); $output .= '<script> function htrn_update_cfg_value() { var htrn_selected_files = \'\'; if ($(\'input[name="nb_store_search_file[]"]\').length > 0) { $(\'input[name="nb_store_search_file[]"]:checked\').each(function() { htrn_selected_files += $(this).attr(\'value\') + \';\'; }); if (htrn_selected_files.length > 0) { htrn_selected_files = htrn_selected_files.substring(0, htrn_selected_files.length - 1); } } $(\'#htrn_files\').val(htrn_selected_files); } $(function() { htrn_update_cfg_value(); if ($(\'input[name="nb_store_search_file[]"]\').length > 0) { $(\'input[name="nb_store_search_file[]"]\').change(function() { htrn_update_cfg_value(); }); } }); </script>'; return $output; } ?> includes/modules/navbar_modules/templates/store_search.php : <div class="col-md-4 col-sm-4 col-xs-12"> <?php echo $search_box; ?> </div> includes/languages/english/modules/navbar_modules/nb_store_search.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_NAVBAR_STORE_SEARCH_TITLE', 'Store Search Bar'); define('MODULE_NAVBAR_STORE_SEARCH_DESCRIPTION', 'Adds your Store Search Bar into the Navbar Area of your site.'); define('MODULE_NAVBAR_STORE_SEARCH_PLACEHOLDER', 'Site search'); // for ext module define('MODULE_NAVBAR_STORE_SEARCH_MORE_PRODUCT', 'View more products...'); define('MODULE_NAVBAR_STORE_SEARCH_NOT_FOUND', 'No products found. Clic here!'); define('MODULE_NAVBAR_STORE_SEARCH_PAGE', 'Page of %s');
  3. It's ok I have found. :) If you want all block in a same row change "navbar.php" template like that : <nav class="navbar<?php echo $navbar_style . $navbar_corners . $navbar_margin . $navbar_fixed; ?> navbar-custom" role="navigation"> <div class="<?php echo BOOTSTRAP_CONTAINER; ?>"> <?php if ($oscTemplate->hasBlocks('navbar_modules_home')) { echo '<div class="navbar-header">' . PHP_EOL; echo $oscTemplate->getBlocks('navbar_modules_home'); } ?> <div class="collapse navbar-collapse" id="bs-navbar-collapse-core-nav"> <?php if ($oscTemplate->hasBlocks('navbar_modules_left')) { echo '<ul class="nav navbar-nav">' . PHP_EOL; echo $oscTemplate->getBlocks('navbar_modules_left'); echo '</ul>' . PHP_EOL; } if ($oscTemplate->hasBlocks('navbar_modules_right')) { echo '<ul class="nav navbar-nav navbar-right">' . PHP_EOL; echo $oscTemplate->getBlocks('navbar_modules_right'); echo '</ul>' . PHP_EOL; } echo '</div>' . PHP_EOL; ?> </div> </div> </nav> <?php echo $navbar_css; ?>
  4. I have seen that if I choose a different CONTENT_PLACEMENT between blocks (navbar_modules_home, navbar_modules_left, navbar_modules_right), the search bar will be in a different row that the other blocks: - search bar with "home" or "left" option => first upper row position - account, checkout_basket with "right" option => second lower row position If I choose same option for all, they will be in the same row but as I want logo and search bar above ("home" option), I need to operate differently. Maybe the issue (and solution) is located in the script of "navbar.php" template ? <nav class="navbar<?php echo $navbar_style . $navbar_corners . $navbar_margin . $navbar_fixed; ?> navbar-custom" role="navigation"> <div class="<?php echo BOOTSTRAP_CONTAINER; ?>"> <?php if ($oscTemplate->hasBlocks('navbar_modules_home')) { echo '<div class="navbar-header">' . PHP_EOL; echo $oscTemplate->getBlocks('navbar_modules_home'); echo '</div>' . PHP_EOL; } ?> <div class="collapse navbar-collapse" id="bs-navbar-collapse-core-nav"> <?php if ($oscTemplate->hasBlocks('navbar_modules_left')) { echo '<ul class="nav navbar-nav">' . PHP_EOL; echo $oscTemplate->getBlocks('navbar_modules_left'); echo '</ul>' . PHP_EOL; } if ($oscTemplate->hasBlocks('navbar_modules_right')) { echo '<ul class="nav navbar-nav navbar-right">' . PHP_EOL; echo $oscTemplate->getBlocks('navbar_modules_right'); echo '</ul>' . PHP_EOL; } ?> </div> </div> </nav> <?php echo $navbar_css; ?>
  5. I don't use this sort of tag, I kept the content block structure to transpose it to data block structure for navbar. I have created a "nb_store_search.php" in includes/modules/navbar_modules directory with "store_search.php" template file : <div class="col-sm-<?php echo $content_width; ?>"> <?php echo $search_box; ?> </div> This trick works with standard seach bar but not with your scipt. Maybe there is a better way to include your script without defective positionat the end. <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2015 osCommerce Released under the GNU General Public License */ class nb_store_search { var $code = 'nb_store_search'; var $group = 'navbar_modules_left'; var $title; var $description; var $sort_order; var $enabled = false; function nb_store_search() { $this->title = MODULE_NAVBAR_STORE_SEARCH_TITLE; $this->description = MODULE_NAVBAR_STORE_SEARCH_DESCRIPTION; if ( defined('MODULE_NAVBAR_STORE_SEARCH_STATUS') ) { $this->sort_order = MODULE_NAVBAR_STORE_SEARCH_SORT_ORDER; $this->enabled = (MODULE_NAVBAR_STORE_SEARCH_STATUS == 'True'); switch (MODULE_NAVBAR_STORE_SEARCH_PLACEMENT) { case 'Home': $this->group = 'navbar_modules_home'; break; case 'Left': $this->group = 'navbar_modules_left'; break; case 'Right': $this->group = 'navbar_modules_right'; break; } } } // function execute() { function getOutput() { global $request_type, $oscTemplate; $content_width = MODULE_NAVBAR_STORE_SEARCH_WIDTH; $search_box = tep_navbar_store_search('btn-info', (MODULE_NAVBAR_STORE_SEARCH_FUNCTIONS == 'Descriptions')); // define typeahead scripts $script = '<script src="' . tep_href_link('ext/bootstrap-plugins/typeahead/bootstrap3-typeahead.min.js', null, $request_type) . '"></script>'; $script .= '<script src="' . tep_href_link('ext/modules/content/header/store_search/content_searches.min.js', null, $request_type) . '"></script>'; $oscTemplate->addBlock($script, 'footer_scripts'); ob_start(); // include(DIR_WS_MODULES . 'content/' . $this->group . '/templates/store_search.php'); // $template = ob_get_clean(); require(DIR_WS_MODULES . 'navbar_modules/templates/store_search.php'); $data = ob_get_clean(); // $oscTemplate->addContent($template, $this->group); $oscTemplate->addBlock($data, $this->group); } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_NAVBAR_STORE_SEARCH_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 Search Module', 'MODULE_NAVBAR_STORE_SEARCH_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 configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Width', 'MODULE_NAVBAR_STORE_SEARCH_WIDTH', '4', 'What width container should the content be shown in?', '6', '1', 'tep_cfg_select_option(array(\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'), ', 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_STORE_SEARCH_PLACEMENT', 'Left', 'Should the module be loaded in the Left or Right or the Home area of the Navbar?', '6', '1', 'tep_cfg_select_option(array(\'Left\', \'Right\', \'Home\'), ', 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 ('Enable Extended Store Search Functions', 'MODULE_NAVBAR_STORE_SEARCH_FUNCTIONS', 'Standard', 'Do you want to enable search function in descriptions?', '6', '1', 'tep_cfg_select_option(array(\'Standard\', \'Descriptions\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Pages', 'MODULE_NAVBAR_STORE_SEARCH_PAGES', '" . implode(';', $this->get_default_pages()) . "', 'The pages to add the Store Search\'s results.', '6', '0', 'nb_store_search_show_pages', 'nb_store_search_pages(', 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_NAVBAR_STORE_SEARCH_SORT_ORDER', '520', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_NAVBAR_STORE_SEARCH_STATUS', 'MODULE_NAVBAR_STORE_SEARCH_WIDTH','MODULE_NAVBAR_STORE_SEARCH_PLACEMENT', 'MODULE_NAVBAR_STORE_SEARCH_FUNCTIONS', 'MODULE_NAVBAR_STORE_SEARCH_PAGES', 'MODULE_NAVBAR_STORE_SEARCH_SORT_ORDER'); } function get_default_pages() { return array( 'shipping.php', 'contact_us.php', 'conditions.php', 'cookie_usage.php', 'privacy.php', 'login.php', 'address_book.php', 'create_account.php', 'account_history.php', 'advanced_search.php', 'products_new.php', 'reviews.php', 'ssl_check.php', 'specials.php', 'shopping_cart.php'); } } function tep_navbar_store_search($btnclass ='btn-default', $description = true) { global $request_type; $search_link = '<div class="searchbox-margin">'; $search_link .= tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', $request_type, false), 'get', 'class="form-horizontal"'); $search_link .= ' <div class="input-group">' . tep_draw_input_field('keywords', '', 'required placeholder="' . MODULE_NAVBAR_STORE_SEARCH_PLACEHOLDER . '" id="quick_search" data-provide="typeahead" autocomplete="off" style="margin-right:-2px;"', 'search') . ' <span class="input-group-btn"><button type="submit" class="btn ' . $btnclass .'"><i class="glyphicon glyphicon-search"></i></button></span>'; if (tep_not_null($description) && ($description === true)) { $search_link .= tep_draw_hidden_field('search_in_description', '1'); } $search_link .= ' </div>'; $search_link .= '</div>'; $search_link .= tep_hide_session_id() . '</form>'; return $search_link; } function nb_store_search_show_pages($text) { return nl2br(implode("\n", explode(';', $text))); } function nb_store_search_pages($values, $key) { global $PHP_SELF; $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.')); $files_array = array(); if ($dir = @[member=dir](DIR_FS_CATALOG)) { while ($file = $dir->read()) { if (!is_dir(DIR_FS_CATALOG . $file)) { if (substr($file, strrpos($file, '.')) == $file_extension) { $files_array[] = $file; } } } sort($files_array); $dir->close(); } $values_array = explode(';', $values); $output = ''; foreach ($files_array as $file) { $output .= tep_draw_checkbox_field('nb_store_search_file[]', $file, in_array($file, $values_array)) . ' ' . tep_output_string($file) . '<br />'; } if (!empty($output)) { $output = '<br />' . substr($output, 0, -6); } $output .= tep_draw_hidden_field('configuration[' . $key . ']', '', 'id="htrn_files"'); $output .= '<script> function htrn_update_cfg_value() { var htrn_selected_files = \'\'; if ($(\'input[name="nb_store_search_file[]"]\').length > 0) { $(\'input[name="nb_store_search_file[]"]:checked\').each(function() { htrn_selected_files += $(this).attr(\'value\') + \';\'; }); if (htrn_selected_files.length > 0) { htrn_selected_files = htrn_selected_files.substring(0, htrn_selected_files.length - 1); } } $(\'#htrn_files\').val(htrn_selected_files); } $(function() { htrn_update_cfg_value(); if ($(\'input[name="nb_store_search_file[]"]\').length > 0) { $(\'input[name="nb_store_search_file[]"]\').change(function() { htrn_update_cfg_value(); }); } }); </script>'; return $output; } ?>
  6. 1. Great contribution that I want to put in navbar but I have a position issue when I want to place it in this area. Curiously the store_search bar takes up more space in height : I haven't got this result with "normal" search bar in the same area... Do you know how to have better integration in this area with your script? 2. Morever, when the screen is in xs size, the window of search results can sometimes get out of the screen depending found products contrary to your video shows : Would you have a solution for the window can automatically adapt to the XS size? 3. Finally I have issue with special caracter like "à, ô, ï" (etc.) when I use the search button, no product found each time. I have checked the sentence in content_searches.php but it look like your fix : urlencode(str_replace(' ', ' ', $query)) An idea of the fix to apply for french language process? Thank you very much for this amazing contribution. :thumbsup:
  7. Thank you, this addon works but there is something wrong with your code that need to be modified to do it. In "Install_Admin.txt" tutorial, during "admin/categories.php" file update, when editing textarea_field (line 312) : } else if (HEADER_TAGS_ENABLE_HTML_EDITOR == 'CKEditor') { echo tep_draw_textarea_ckeditor('products_description[' . $languages[$i]['id'] . ']', '70', '10',(isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id'])),'id = products_description[' .$languages[$i]['id'] . ']'); Need to replace by this one : } else if (HEADER_TAGS_ENABLE_HTML_EDITOR == 'CKEditor') { echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '10', (isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id'])),'id = products_description[' . $languages[$i]['id'] . '] class="ckeditor"'); Like this all works perfect, no need to create specific "tep_draw_textarea_ckeditor" function. :)
  8. @@Jack_mcs could you give me the link of the CKeditor addon that works with your contrib because it 100% sure that the actual CKEditor osC 2.3.1 contribution is not compatible.
  9. I have a question about "Install_Admin.txt", during "admin/categories.php" file update, when editing product description textarea field : } else if (HEADER_TAGS_ENABLE_HTML_EDITOR == 'CKEditor') { echo tep_draw_textarea_ckeditor('products_description[' . $languages[$i]['id'] . ']', '70', '10',(isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id'])),'id = products_description[' .$languages[$i]['id'] . ']'); Find at the end of the line 312, this sentence that prevents any view content of the expected $products_description[$languages[$i]['id']]) ,'id = products_description[' .$languages[$i]['id'] . ']' Same for "tep_draw_textarea_ckeditor" entry that don't match with any contribution for CKeditor install. @@Jack_mcs could you provide more information about this code and explain how it can work ? Surely it's needed to create a "function tep_draw_textarea_ckeditor" in "admin/includes/functions/html_output.php" file but no information about this... nowhere... Google can't help me this time ! :/ Extra information on "Install_Admin.txt" will be nice to explain the CKeditor integration sequence with this great contribution. ^_^
  10. Thank you for this quick fix ! I already took a look at this file/function yesterday but, because of fatigue, I obviously missed it. ^_^' NB: This version seems very accomplished, a little confusing at first (there are so many parameters!), You soon figure out the interest of all of them after some tests and finally they all have their usefulness. Nice work Jack. ;)
  11. Hi, After installing v3.3.4 for the latest boostrap script and make several tests, I have found an issue on the admin when I edit a category. The issue is that the "Header Tags Category Breadcrumb" field is always empty even if their is a record on DB - categories_htc_breadcrumb_text. This bug gives me crazy, I have spent many hours today to solve this but even with the original files of your packaging, the bug goes on. I can record/save from the field, the selected single or multiple words appear on the store side Breadcrumb but no display from "Edit category" page (admin/categories.php). Very strange issue... oO' Do you know this anomaly or am I the only one to meet it ? Thank you for your help.
  12. It's OK, I found a trick to resolve this matter. All posted here (french forum) : http://www.oscommerce-fr.info/forum/index....showtopic=52170
  13. For accounting purposes (credit note), I try to bring up negative VAT in the total (ot_tax) in the case of a negative quantity product (-1 for exemple). But since v.5, this possibility isn't given, the "total taxes" field being withdrawn all times if negative, whereas the v.3 allowed it... :( Could someone know how to solve this problem ?
  14. Sorry this is a misunderstanding, I mentioned the fact that you can not have the real subtotal products without the rebate amount applied. That's the problem I mentioned when MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_SUBTOTAL == 'false' . We arrive at a good subtotal by changing this : //agrafuese - subtotal fix $shown_price = $product['final_price'] * $product['qty']; } else { $applied_discount = 0; $shown_price = ( $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty'] ) - ( $discount['applied_discount'] + $discount['discount_tax'] ); } By this : $shown_price = $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty']; } else { $applied_discount = 0; $shown_price = ( $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty'] ) - ( $discount['applied_discount'] + $discount['discount_tax'] ); } But total is wrong. So it is necessary to change the caculate of the total in this line (around 413) : MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_SUBTOTAL == 'false' ) { //subtract the discount from the order total if it's not displayed in the subtotal foreach( $this->applied_discount as $discount ) { $info['total'] -= $discount; I have tried somethings like that : MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_SUBTOTAL == 'false' ) { //subtract the discount from the order total if it's not displayed in the subtotal $final_discount = $discount['applied_discount'] + $discount['discount_tax']; foreach( $this->final_discount as $discount ) { $info['total'] -= $discount; But the object $this->final_discount is invalid and the caculating isn't made. Do you have any idea how could we do this calculating ?
  15. Many people wait for this bug fix but nobody seems to work on... :(
  16. Hi, I'm a french user of your DCC contribution and, as agrafuese, I'm trying to fix the issue when we choose "false" for not displaying discount in the subtotal. The code offers by agrafuese works half cause it don't apply tax both in subtotal and total (amounts are out of tax) : if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_SUBTOTAL == 'false' ) { //we don't want to display the subtotal with the discount applied, so apply the discount then set the applied_discount variable to zero so that it's not added into the order subtotal, but is still used to correctly calculate tax $actual_shown_price = ( $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty'] ) - ( $discount['applied_discount'] + $discount['discount_tax'] ); $applied_discount = 0; //agrafuese - subtotal fix $shown_price = $product['final_price'] * $product['qty']; } else { $applied_discount = 0; $shown_price = ( $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty'] ) - ( $discount['applied_discount'] + $discount['discount_tax'] ); } /********** } $shown_price = ( $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty'] ) - ( $discount['applied_discount'] + $discount['discount_tax'] ); **********/ // END agrafuese - subtotal fix When I tried to let appear tax in subtotal, total is wrong : if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_SUBTOTAL == 'false' ) { //we don't want to display the subtotal with the discount applied, so apply the discount then set the applied_discount variable to zero so that it's not added into the order subtotal, but is still used to correctly calculate tax $actual_shown_price = ( $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty'] ) - ( $discount['applied_discount'] + $discount['discount_tax'] ); $applied_discount = 0; //agrafuese - subtotal fix $shown_price = ( $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty'] ); } else { $applied_discount = 0; $shown_price = ( $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty'] ) - ( $discount['applied_discount'] + $discount['discount_tax'] ); } /********** } $shown_price = ( $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty'] ) - ( $discount['applied_discount'] + $discount['discount_tax'] ); **********/ // END agrafuese - subtotal fix It is a little pity to leave things as well, don't you think ? Do you have as me the same issue when the discount is not applied to sub-total ? Do you know a way to solve this problem ? Thank you for your attention. milerwan
  17. I have just updated my "loved" version of Order Editor 3.0.1 cause I need the shipping taxes auto-calculating for my store. So I have done the update for the v5.06 but I meet real bugs according to : 1 - Notched boxes : When I notch boxes to make the forwarding and/or the bill-to-addresses identical, nothing in occurs. It is necessary that I update by the button so that this or these ones disappear. But once disappeared, impossible to make them reappear!?! Serious bug, isn't it ? 2 - Characters problems for delivery module names : Minor Bug reported previously under Ajax, where the special characters are badly transcribed... Does it exist a solution ? 3 - Update of the status impossible with apostrophe character : The management of the apostrophes is not taken into account contrary to the version 3.0.1 which I have. How that is it done and how to solve the problem ? If other users have met the same problems as me, thank you to indicate it by repling to this post. Thank you for your answers.
  18. Hi Chemo, Your Ultimate SEO enabled me to be on first page of google, I highly thank you. :thumbsup: I come towards you because it happens to me to update the name of my card-products and Google updates only the header-tags name and not the URL Re-writed. :huh: I don't want to spend the rank of my page by creating another more especially as it is about an update of the product in the title. >_< Have you got a solution to make the altered re-writed URL replaces the ancient one in Google like magic SEO URL proposes ? Thank you. NB:
  19. It's me again ! In fact, we must have to go into includes/application_top.php and search the ligne 398 approximately : $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $attributes))+1, $attributes); //++++ QT Pro: End Changed Code and change the code above by the following one : $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $attributes)) + $HTTP_POST_VARS['cart_quantity'], $attributes); //++++ QT Pro: End Changed Code quite simply... :oops: I hope that this code will be usefull for others. ++
  20. Hi everyone, I have just finished to install this very well contribution after passed one sleepless night to make it integrate perfectly to my store, as I wanted it, but... As many of us, I have the Price_break contribution fitted to do purchases in quantity, directely from the product_info.php page. The 2 contributions work fine together (nice job) EXCEPT for purchasing in quantity from the product_info.php page via the ENTER_QUANTITY field. At first sights, in acqusation, the following change : <td class="main" align="right"> <table border="0" align="right"> <tr><td align="center"> <?php echo TEXT_ENTER_QUANTITY . ":" . tep_draw_input_field('cart_quantity', $pf->adjustQty(1), 'size="6"'); ?> </td></tr> <tr><td align="center"> <?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?> </td></tr> </table> </td> instead of : <td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td> Obviously the adjustQty($qty) not working as before because products can't be send to the basket selected quantity , just only one article at the time like original osc2. >_< This function is stocked with in the includes/classes/PriceFormatter.php file in this original write : function adjustQty($qty) { // Force QTY_BLOCKS granularity $qb = $this->getQtyBlocks(); if ($qty < 1) $qty = 1; if ($qb >= 1) { if ($qty < $qb) $qty = $qb; if (($qty % $qb) != 0) $qty += ($qb - ($qty % $qb)); } return $qty; }[code] and above this function with trace of the adjustQty($qty) function : [code] function computePrice($qty, $no_of_other_items_in_cart_with_same_base_pid = 0) { $qty = $this->adjustQty($qty); $qty += $no_of_other_items_in_cart_with_same_base_pid; // Compute base price, taking into account the possibility of a special $price = ($this->hasSpecialPrice === TRUE) ? $this->specialPrice : $this->thePrice; for ($i=1; $i<=8; $i++) if (($this->quantity[$i] > 0) && ($qty >= $this->quantity[$i])) $price = $this->price[$i]; return $price; } Thus my question is as follow, somebody could it say to me if it foresee a solution with this problem. Thank you for your assistances. ;)
  21. ********* HOT NEW !!! ********* V1.2 by milerwan (20.05.2007): - Prices and special prices added - Fix for Price Break contribution with PriceFormatter.php file (with special price fix) - French language added - stylesheet.css added for modulable color and size prices This is full package. Enjoy! : ) Available HERE.
  22. In my cas, I have the contribution Price Break installed and it would have been necessary me to adapt the code to allow the correct dispaly of the prices (price range and specials). I already wrote that but I find products with the barred price systematicaly in the place of the normal price as well as the range price : function html_content() { global $currencies, $languages_id; //create HTML string containing links & pics define('COLS', 2); $width = intval(100/COLS); $html_content = '<table border="0" width="100%" height="100%" cellpadding="2" cellspacing="3"><tr><td colspan="' . COLS . '" align="center" class="content">' . $this->content . '</td></tr><tr><td colspan="2">' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td></tr><tr>'; $col = 0; if ($this->products != ''){ $images_query = tep_db_query("select p.products_id, pd.products_name, p.products_image, p.products_quantity, p.products_tax_class_id, s.status, s.specials_new_products_price, specials_new_products_price, p.products_price from (" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where pd.language_id = '1' and pd.products_id = p.products_id and p.products_id in(" . $this->products . ")"); } while($images = tep_db_fetch_array($images_query)){ $images['products_name'] = tep_get_products_name($images['products_id']); $images['specials_new_products_price'] = tep_get_products_special_price($images['products_id']); if (tep_not_null($this->products['specials_new_products_price'])) { $whats_new_price = '<s>' . $currencies->display_price($images['products_price'], tep_get_tax_rate($images['products_tax_class_id'])) . '</s><br>'; $whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($images['specials_new_products_price'], tep_get_tax_rate($images['products_tax_class_id'])) . '</span>'; } else { $pf->loadProduct((int)$images['products_id'], (int)$languages_id); $whats_new_price = $pf->getPriceStringshort(); } if($col > COLS-1){ $html_content .= '</tr><tr><td class="content" align="center" width="' . $width . '%">' . tep_draw_separator('pixel_trans.gif', '1', '4') . '<br><a href="' . tep_catalog_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $images['products_id']) . '" class="content">' . tep_image(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES . $images['products_image'], $images['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br>' . tep_draw_separator('pixel_trans.gif', '1', '2') . '<br>' . $images['products_name'] . '</a><br>' . tep_draw_separator('pixel_trans.gif', '1', '2') . '<br><span class="productNormalPrice">' . $whats_new_price . '</span><br>' . tep_draw_separator('pixel_trans.gif', '1', '6') . '</td>'; $col = 0; }else{ $html_content .= '<td class="content" align="center" width="' . $width . '%">' . tep_draw_separator('pixel_trans.gif', '1', '4') . '<a href="' . tep_catalog_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $images['products_id']) . '" class="content">' . tep_image(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES . $images['products_image'], $images['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br>' . tep_draw_separator('pixel_trans.gif', '1', '2') . '<br>' . $images['products_name'] . '</a><br>' . tep_draw_separator('pixel_trans.gif', '1', '2') . '<br><span class="productNormalPrice">' . $whats_new_price . '</span><br>' . tep_draw_separator('pixel_trans.gif', '1', '6') . '</td>'; } $col++; } $html_content .= '</tr></table>'; Preliminary, I have insert into admin/newsletters.php : // include currencies class and create an instance require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); // include the price formatter for the price breaks contribution require(DIR_WS_CLASSES . 'PriceFormatter.php'); $pf = new PriceFormatter; And I added the PriceFormatter.php file into admin/includes/classes in order to obtain the "getPriceStringshort" function and into admin/includes/functions/general.php the "tep_get_products_special_price" function : //// // Return a product's special price (returns nothing if there is no offer) // TABLES: products function tep_get_products_special_price($product_id) { $product_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$product_id . "' and status"); $product = tep_db_fetch_array($product_query); return $product['specials_new_products_price']; } I took as a starting point from the model offered by the file includes/modules/new_products.php. So, if someone haved installed the Price Break contibution (or not) and want to give me a small blow of inch that would have come very well. :)
  23. Hi, After many hours on the Links Manager code, I have failed to display more links in the Featured Link Area (3 links at the same time were perfect for me). Is there an alternative trick about it? Thanks. PS : Sorry for double post :sweating:
  24. Hi, After many hours on the Links Manager code, I have failed to display more links in the Featured Link Area (3 links in the same time were perfect for me). Is there an alternative trick about it? Thanks.
×
×
  • Create New...