Jump to content
Latest News: (loading..)

Leaderboard


Popular Content

Showing content with the highest reputation since 12/17/2018 in Posts

  1. 14 points
    burt

    28d, 2019 - Pre Orders are now open

    Hello all, pre-orders are now open for my next 28d package of mods. Those who pre-order get the whole package of mods at a cut-down price compared to those who wait until February. I have a demo site up and running, showcasing the mods that I have coded so far. If anyone is interested in taking a look at Demo site (without obligation to pre-order, though I hope you will), please PM me. 2019 will hopefully be a year of change for osCommerce, and as I am the only developer keeping osCommerce somewhat relevant ... I hope that everyone will take the opportunity to show their support. Thank You.
  2. 3 points
    Jack_mcs

    HoneyPot Captcha

    A new version has been uploaded with these changes: Changed the url search code to only look at the protocol and to check for named protocols. Changed the position of the error variable to make it global for the contact us page for pre-2.3 shops. Removed global option search that could fail in some cases. The first change is an important one because Russian spammers are starting to use the tld рф. There will probably be more to follow as the use of such tld's increase. The change to the code makes it so tld's are ignored so any url should be caught now. Please report any emails that get through with url's.
  3. 2 points
    Jack_mcs

    Gift Vouchers Secure

    This is a new version of the long-standing Gift Vouchers addon. It is named "secure" because the previous versions, at least the ones I am familiar with, have a large number of security holes in them. All of those have been plugged in this version and other changes made to further the security. This version also has features other versions don't have. Here are some of the major points of this version: Apply to specific customers. Apply to specific products. Apply to specific categories. Apply to specific manufacturers. Include or Exclude options for products, categories and manufacturers. Date is set by jquery date picker so it doesn't expire. Show only certain coupons in admin display. Sortable columns in admin display. This can be used to replace existing installations but not directly. There are some changes that are needed beyond a normal installation. I have documented those as much as I can but due to the number of versions of Gift Vouchers, I can't cover them all. This version is mainly written for the CE version with the modular checkout addon by @raiwainstalled. It will work in other versions but the instructions are not complete, though using a compare program should work.
  4. 2 points
    Jack_mcs

    OSC Error Handler

    This addon prevents mysql errors from being displayed on the site. This is important because hackers will deliberately enter an invalid url to cause a failure, which they use to decide how best to attack it. It is compatible with all versions of oscommerce and only requires one file change to install.
  5. 2 points
    You are welcome to help. Why not do an install and document all your steps. You can then post your experience for others to use. Remember the it's up to the community to help keep things moving forward and that includes you. This will help you get started.
  6. 2 points
    Demitry

    Featured Products BS

    @Tsimi ...you put the "bro" in Lambros 😀 yeah man, ..that's exactly what I was trying to achieve and I'm not very good with SQL. Thank you for the help. I just tested this mod and it works as it should. If you want, you can add it to the next update release. Ok, so here is the complete mod to only show the "See More" button when the number of Featured Products exceeds the content limit set in admin for the particular module. I'm just going to use the index module for this sample, and this is for BS Edge. I'm not sure if there is a difference with other versions. /index/modules/content/index/cm_i_featured_products.php 1) FIND this code: if (tep_db_num_rows($featured_products_query) > 0) { // Show only if we still have products in the array ADD just ABOVE it: // this will show/hide the "See More" button $fp_count_query = tep_db_query("select count(*) as total from featured WHERE status = '1'"); $fp_count = tep_db_fetch_array($fp_count_query); $fp_btn = 'style="display:none;"'; if ($fp_count['total'] > MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_CONTENT_LIMIT) { $fp_btn = 'style="display:inline;"'; } 2) FIND this code: $featured_products_content = '<h3>' . ($cat_name != '' ? sprintf(MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_CATEGORY_TITLE, $cat_name) : MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_TITLE . ((MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_SHOW_BUTTON == 'True')? ' ' . tep_draw_button(MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_IMAGE_BUTTON_SEE_MORE, 'glyphicon glyphicon-triangle-right', tep_href_link('featured_products.php'), 'primary', null, 'btn-default btn-sm'):'')) . '</h3>'; REPLACE it with this: $featured_products_content = '<h3>' . ($cat_name != '' ? sprintf(MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_CATEGORY_TITLE, $cat_name) : MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_TITLE . ((MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_SHOW_BUTTON == 'True')? '&nbsp;&nbsp;<span ' . $fp_btn . '>' . tep_draw_button(MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_IMAGE_BUTTON_SEE_MORE, 'glyphicon glyphicon-triangle-right', tep_href_link('featured_products.php'), 'primary', null, 'btn-default btn-sm') . '</span>':'')) . '</h3>';
  7. 2 points
    Eh? You're talking about the same thing! Anyway, there are up to four layers of protection to keep bad guys out of your shop administration: Using SSL so they can't "snoop" on the admin traffic. The whole site should be under SSL (https) these days, so that's a moot point. Administrator ID and password -- not easily guessable, right? Unguessable admin directory name. The first thing every hacker tries is to get into your <domain>/admin area, so changing admin to something weird is good. Server "password protection" on admin and everything under it. This means having to "log in" a second time to get in. Of course, the ID and password you use is different from the Administrator ID and password, right? Number 4 is the issue at hand. You are much better off using your control panel's "password protect a directory" function than trying to install the files supplied with osCommerce. The former is guaranteed to work and is easy to install, while the latter is iffy and difficult to install. The only downside to using your control panel function is that osC's security check may not recognize that you did it, and report that there is no password protection, when there is. If you have to give two separate logins to get to your admin functions, it's working. Many sites choose not to do #4. It's less secure, but that's up to your comfort level.
  8. 2 points
    @Rwe @Smoky Barnable @osComMarket Thank you for your valuable input to help finding a solution to my problem. Take the rest of it outside the forum.
  9. 2 points
    raiwa

    Store Mode BS

    Uploaded update: Store Mode 1.2.1 BS Changes Version 1.2.1: - Changed .htaccess protection for backup directory and files. Thanks to @vmn - Changed redirect to 307 Thanks to @vmn - Added back time setting to 2 hours if no time is entered in ht module. Thanks to @vmn - Added show/hide back time configuration setting in ht module. - Update header content module to auto include template file and new template file naming standard.
  10. 1 point
    @MyBookShop Do you have this installed on a live site? If so, can you post (or pm) your site URL? M
  11. 1 point
    Or you could lower the short word setting.
  12. 1 point
    Martin, you might be better off with a small change to the standard filter: function short_name($str, $limit=3){ $container = array(); if ( $this->attributes['SEO_URLS_FILTER_SHORT_WORDS'] != 'false' ) $limit = (int)$this->attributes['SEO_URLS_FILTER_SHORT_WORDS']; $foo = @explode('-', $str); foreach($foo as $index => $value){ switch (true){ case ( strlen($value) <= $limit && (! is_numeric($value)) ): continue; default: $container[] = $value; break; } } # end foreach $container = ( sizeof($container) > 1 ? implode('-', $container) : (sizeof($container) > 0 ? $container[0] : $str )); return $container; } ie. don't filter any numbers - the change is in the case line in the switch
  13. 1 point
    Dear @MyBookShop Please find the contents of my PHP file: includes/classes/category_tree.php <?php /** * osCommerce Online Merchant * * @copyright Copyright (c) 2014 osCommerce; http://www.oscommerce.com * @license GNU General Public License; http://www.oscommerce.com/gpllicense.txt */ class category_tree { protected $_data = array(); var $root_category_id = 0, $max_level = 0, $root_start_string = '', $root_end_string = '', $parent_start_string = '', $parent_end_string = '', $parent_group_start_string = '<ul>', $parent_group_end_string = '</ul>', $parent_group_apply_to_root = false, $child_start_string = '<li>', $child_end_string = '</li>', $breadcrumb_separator = '_', $breadcrumb_usage = true, $spacer_string = '', $spacer_multiplier = 1, $follow_cpath = false, $cpath_array = array(), $cpath_start_string = '---', $cpath_end_string = ''; public function __construct() { global $languages_id; static $_category_tree_data; if ( isset($_category_tree_data) ) { $this->_data = $_category_tree_data; } else { $categories_query = tep_db_query("select c.categories_id, c.parent_id, c.categories_image, cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id. "' order by c.parent_id, c.sort_order, cd.categories_name"); while ( $categories = tep_db_fetch_array($categories_query) ) { $this->_data[$categories['parent_id']][$categories['categories_id']] = array('name' => $categories['categories_name'], 'image' => $categories['categories_image']); } $_category_tree_data = $this->_data; } } protected function _buildBranch($parent_id, $level = 0) { $result = ((($level === 0) && ($this->parent_group_apply_to_root === true)) || ($level > 0)) ? $this->parent_group_start_string : null; if ( isset($this->_data[$parent_id]) ) { foreach ( $this->_data[$parent_id] as $category_id => $category ) { if ( $this->breadcrumb_usage === true ) { $category_link = $this->buildBreadcrumb($category_id); } else { $category_link = $category_id; } $result .= $this->child_start_string; if ( isset($this->_data[$category_id]) ) { $result .= $this->parent_start_string; } /*Begin Distinguish sub categories category box*/ if ( $level === 0 ) { $result .= $this->root_start_string; } else { switch ($level) { case 1: $result .= '<i class="text-info fas fa-chevron-circle-right pull-left" style="margin-top:13px; margin-left:13px; "></i>'; break; case 2: $result .= '<i class="text-info fas fa-sign-out-alt pull-left" style="margin-top:13px; margin-left:13px; "></i>'; break; case 3: $result .= '<i class="text-info fas fa-chevron-circle-right pull-left" style="margin-top:13px; margin-left:13px; color:#3cbecc"></i>'; break; case 4: $result .= '<i class="text-info fas fas fa-sign-out-alt pull-left" style="margin-top:13px; margin-left:13px; color:#3cbecc"></i>'; break; default: $result .= $this->root_start_string; } } /*End Distinguish sub categories category box*/ if ( ($this->follow_cpath === true) && in_array($category_id, $this->cpath_array) ) { $link_title = $this->cpath_start_string . $category['name'] . $this->cpath_end_string; } else { $link_title = $category['name']; } $result .= '<a href="' . tep_href_link('index.php', 'cPath=' . $category_link) . '">'; $result .= str_repeat($this->spacer_string, $this->spacer_multiplier * $level); $result .= $link_title . '</a>'; if ( $level === 0 ) { $result .= $this->root_end_string; } if ( isset($this->_data[$category_id]) ) { $result .= $this->parent_end_string; } if ( isset($this->_data[$category_id]) && (($this->max_level == '0') || ($this->max_level > $level+1)) ) { if ( $this->follow_cpath === true ) { if ( in_array($category_id, $this->cpath_array) ) { $result .= $this->_buildBranch($category_id, $level+1); } } else { $result .= $this->_buildBranch($category_id, $level+1); } } $result .= $this->child_end_string; } } $result .= ((($level === 0) && ($this->parent_group_apply_to_root === true)) || ($level > 0)) ? $this->parent_group_end_string : null; return $result; } function buildBranchArray($parent_id, $level = 0, $result = '') { if (empty($result)) { $result = array(); } if (isset($this->_data[$parent_id])) { foreach ($this->_data[$parent_id] as $category_id => $category) { if ($this->breadcrumb_usage == true) { $category_link = $this->buildBreadcrumb($category_id); } else { $category_link = $category_id; } $result[] = array('id' => $category_link, 'title' => str_repeat($this->spacer_string, $this->spacer_multiplier * $level) . $category['name']); if (isset($this->_data[$category_id]) && (($this->max_level == '0') || ($this->max_level > $level+1))) { if ($this->follow_cpath === true) { if (in_array($category_id, $this->cpath_array)) { $result = $this->buildBranchArray($category_id, $level+1, $result); } } else { $result = $this->buildBranchArray($category_id, $level+1, $result); } } } } return $result; } function buildBreadcrumb($category_id, $level = 0) { $breadcrumb = ''; foreach ($this->_data as $parent => $categories) { foreach ($categories as $id => $info) { if ($id == $category_id) { if ($level < 1) { $breadcrumb = $id; } else { $breadcrumb = $id . $this->breadcrumb_separator . $breadcrumb; } if ($parent != $this->root_category_id) { $breadcrumb = $this->buildBreadcrumb($parent, $level+1) . $breadcrumb; } } } } return $breadcrumb; } /** * Return a formated string representation of the category structure relationship data * * @access public * @return string */ public function getTree() { return $this->_buildBranch($this->root_category_id); } /** * Magic function; return a formated string representation of the category structure relationship data * * This is used when echoing the class object, eg: * * echo $osC_CategoryTree; * * @access public * @return string */ public function __toString() { return $this->getTree(); } function getArray($parent_id = '') { return $this->buildBranchArray((empty($parent_id) ? $this->root_category_id : $parent_id)); } function exists($id) { foreach ($this->_data as $parent => $categories) { foreach ($categories as $category_id => $info) { if ($id == $category_id) { return true; } } } return false; } function getChildren($category_id, &$array = array()) { foreach ($this->_data as $parent => $categories) { if ($parent == $category_id) { foreach ($categories as $id => $info) { $array[] = $id; $this->getChildren($id, $array); } } } return $array; } /** * Return category information * * @param int $id The category ID to return information of * @param string $key The key information to return (since v3.0.2) * @return mixed * @since v3.0.0 */ public function getData($id, $key = null) { foreach ( $this->_data as $parent => $categories ) { foreach ( $categories as $category_id => $info ) { if ( $id == $category_id ) { $data = array('id' => $id, 'name' => $info['name'], 'parent_id' => $parent, 'image' => $info['image']); return ( isset($key) ? $data[$key] : $data ); } } } return false; } /** * Return the parent ID of a category * * @param int $id The category ID to return the parent ID of * @return int * @since v3.0.2 */ public function getParentID($id) { return $this->getData($id, 'parent_id'); } function setRootCategoryID($root_category_id) { $this->root_category_id = $root_category_id; } function setMaximumLevel($max_level) { $this->max_level = $max_level; } function setRootString($root_start_string, $root_end_string) { $this->root_start_string = $root_start_string; $this->root_end_string = $root_end_string; } function setParentString($parent_start_string, $parent_end_string) { $this->parent_start_string = $parent_start_string; $this->parent_end_string = $parent_end_string; } function setParentGroupString($parent_group_start_string, $parent_group_end_string, $apply_to_root = false) { $this->parent_group_start_string = $parent_group_start_string; $this->parent_group_end_string = $parent_group_end_string; $this->parent_group_apply_to_root = $apply_to_root; } function setChildString($child_start_string, $child_end_string) { $this->child_start_string = $child_start_string; $this->child_end_string = $child_end_string; } function setBreadcrumbSeparator($breadcrumb_separator) { $this->breadcrumb_separator = $breadcrumb_separator; } function setBreadcrumbUsage($breadcrumb_usage) { if ($breadcrumb_usage === true) { $this->breadcrumb_usage = true; } else { $this->breadcrumb_usage = false; } } function setSpacerString($spacer_string, $spacer_multiplier = 2) { $this->spacer_string = $spacer_string; $this->spacer_multiplier = $spacer_multiplier; } function setCategoryPath($cpath, $cpath_start_string = '', $cpath_end_string = '') { $this->follow_cpath = true; $this->cpath_array = explode($this->breadcrumb_separator, $cpath); $this->cpath_start_string = $cpath_start_string; $this->cpath_end_string = $cpath_end_string; } function setFollowCategoryPath($follow_cpath) { if ($follow_cpath === true) { $this->follow_cpath = true; } else { $this->follow_cpath = false; } } function setCategoryPathString($cpath_start_string, $cpath_end_string) { $this->cpath_start_string = $cpath_start_string; $this->cpath_end_string = $cpath_end_string; } }
  14. 1 point
    artfulweb

    AJAX Attribute Manager support

    Sorry Rainer, I missed that. Otherwise it works great and is really a must have! Have a Happy New Year Barbie
  15. 1 point
    cdetdi

    Paypal Express Dropping Tax Calculation

    Fixed for now - I added a function in general that looks to see if the PAYMENTREQUEST_0_TAXAMT is in the Paypal array which then turns on the tax rate I need. The fact that this works suggests that it was the shop that calculated the rate by itself (disregarding the PayPal return) and the shop was dropping the tax rate.
  16. 1 point
    Jack_mcs

    HoneyPot Captcha

    The following code will block any emails from gmail but if you truly mean to block "any spammer" from gmail, I don't think that is possible since spam can be a simple message saying "hello". But to block all emails from gmail, find if (!tep_validate_email($email_address)) { and change it to $fail = (strpos($email_address, 'gmail') !== false ? true : false); if ($fail || !tep_validate_email($email_address)) {
  17. 1 point
  18. 1 point
    Good to see progress being made by all. I recently tested the latest offering by @Gyakutsuki which is already Bootstrap 4, shop and admin and it's looking very good. So looks like we will have a good selection of options to move forwared with.
  19. 1 point
    Have a merry Christmas Henry. 😂
  20. 1 point
    Frozen here https://github.com/gburton/Responsive-osCommerce/archive/2341-Frozen.zip Edge here https://github.com/gburton/Responsive-osCommerce/archive/master.zip
  21. 1 point
    Option to add PDF User Manual and Instalation Manual Tab is available. It's a simple no core changes or db changes. Was done for another user just to see if it could be done with no core changes. If anyone is intrested shout and I'll add to the Tabs add-on in the new year. You can see and test it on the test site https://chilleddisplays.co.uk/product_info.php/cPath/1_9/products_id/39 If a product has pdf files you get, If product has none then a message is displayed.
  22. 1 point
    raiwa

    Holiday Promotional Message 2.0 BS

    Update uploaded: Holiday-Promotional Message 2.1 BS Changes version 2.1.1: - reverted wrong fix introduced in 2.1. - applied correct fix in admin/modules_content.php to allow sql sensitive special characters like single quote (apostrophe) in Text definitions.
  23. 1 point
    Hello, Updated version is available. Added the Dutch and German Language files. Greetings, Dj-Viper
  24. 1 point
    Hello, Updated version is available. Added the Dutch and German Language files. Greetings, Dj-Viper
  25. 1 point
    John W

    Fake accounts

    I've had a few of these in the last month with some different names, but they enter Google for company and google for company tax id each time. I know not company tax id isn't stock code, but I added this to block spammers and I can add more to it if I need. Most regular customers don't enter a tax id, but only spammers enter google for it. I also have it send me an email to notify me it's happened so I can track it. //Added to block spammers if (strtolower($company_tax_id) == 'google') { $error = true; $messageStack->add('create_account', "You have triggered spamming prevention rules. If you info is correct and you are not a spammer please contact us or try again."); $spam_email_text = "Spammer Alert: " . $firstname . " " . $lastname . "Using company name: " . $company . " with tax id: " . $company_tax_id . " triggered spam alert."; tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, 'Spammer Alert:', $spam_email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); } //END Added to block spammers
×