Latest News: (loading..)

dvale

Members
  • Content count

    63
  • Joined

  • Last visited

2 Followers

About dvale

Profile Information

  • Real Name
    Paul Vale
  1. There is now a smart way to set special characters of filters over db table specification_filter_aliasses catalog/includes/modules/products_filter.php /////////////FIND///////////// $filters_select_array[$filter_index] = array ('id' => ($filter_id), 'text' => $filter_text, 'count' => $count ); $filter_index++; /////////////PLACE BEFORE///////////// $needles = array('slash', 'inch', 'comma'); $haystack = array('/', '"', ','); $filter_text = str_replace($needles, $haystack, $filter_text); /////////////So it looks like this///////////// $needles = array('slash', 'inch', 'comma'); $haystack = array('/', '"', ','); $filter_text = str_replace($needles, $haystack, $filter_text); //str_replace($needles, $replacements, $string); $filters_select_array[$filter_index] = array ('id' => ($filter_id), 'text' => $filter_text, 'count' => $count ); $filter_index++; So now you can replace special characters with keywords in this way: / = slash " = inch , = comma ...and so on, depending of your need. For example to type: 3/4" ...now you type: 3slash4inch In this way the filters and values are set with keywords allowing the proper display of the Special Characters. Live example here https://www.shopperstation.com/auto_parts/index.php?cPath=3_12 Full credit to Henry Withoot Donations will be accepted through PayPal osc2nuke@gmail.com Regards, Paul
  2. I can't rewrite the code since I don't know how. I'm just a curious person that can pull the logic around. I thought that since you are the add on creator, you might see the advantage of the change and perhaps you could know faster than anybody else where to rewrite the code. I know someone that can rewrite the code but at a price. And he is actually thinking about create an add on for the filters only, without the other features products specifications add on have. I'm looking forward for your advice. Regards, Paul
  3. Healthy question about the problem with the filters special characters. Why not load the filter results by id instead of using the text content or name of filters and values ???? Why make all that code to sanitize ^%$#@#Q ................ if just tell spec1_id=4&spec7_id=56 etc etc ?? If have 5 products containing spec1_id=4 and spec7_id=56 ... show them after can filter for other specX_id=XX // Decode the URL-encoded names, including arrays $$var = tep_decode_recursive ($_GET[$var]); // Sanitize variables to prevent hacking $$var = tep_clean_get__recursive ($$var); Regards, Paul
  4. Special characters for the filters /"!*$+& etc................. I checked pages behind as you suggested. I didn't find the solution. Any updates for this little glitch ? Regards, Paul
  5. Full credit to Henry Withoot for fixing this bug. admin/categories.php Find : '" . (int) $specifications['specification_description_id'] . "', Replace for: '" . (int)$specifications['specifications_id'] . "', Thank you Henry Withoot for you help on this one. Regards, Paul
  6. I don't have a demo site, but I will get it done for you to test on it. Regards, Paul
  7. Hello Jonas, Is this module compatible with Discount Code? Regards, Paul.
  8. Thanks Jim. I'll be waiting for your posting about the bug in the copy feature. Are you part of Support Forum Sponsorships service? I was trying to subscribe to the Community Sponsorship but there is a problem with the currency. There is an option to change currency but doesn't keep the selection once you step in the next page. Any suggestion ? Regards, Paul
  9. Hello. I just need to know if is me with the issue that the filter specifications are not duplicating as the rest of the data when duplicate a product in the admin. I'm being trying to turn this in the right way but my lack of time is not helping. Does anybody have this problem? I really would like to know how to fix it. Regards, Paul
  10. Just to make sure we are in the same page. I'm using the filters ONLY. I already have the tab_descriptions installed in my website so I'm not using the tabs provided with the module. products_tab_1, products_tab_2, products_tab_3, products_tab_4, products_tab_5, products_tab_6, take a look: https://www.shopperstation.com/games-c-4_5_6/?language=en So when I duplicate a product, everything gets duplicate fine except for the filter selections and creates the problem described above in the database. What I'm doing right now is deleting manually the database entries created when duplicate a product. I guess until I figure how to duplicate everything properly. Regards, Vale
  11. I was looking at the code and I don't see any code provided for the specifications here. case 'copy_to_confirm': if (isset($HTTP_POST_VARS['products_id']) && isset($HTTP_POST_VARS['categories_id'])) { $products_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']); $categories_id = tep_db_prepare_input($HTTP_POST_VARS['categories_id']); if ($HTTP_POST_VARS['copy_as'] == 'link') { if ($categories_id != $current_category_id) { $check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$products_id . "' and categories_id = '" . (int)$categories_id . "'"); $check = tep_db_fetch_array($check_query); if ($check['total'] < '1') { tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int)$products_id . "', '" . (int)$categories_id . "')"); } } else { $messageStack->add_session(ERROR_CANNOT_LINK_TO_SAME_CATEGORY, 'error'); } } elseif ($HTTP_POST_VARS['copy_as'] == 'duplicate') { $product_query = tep_db_query("select products_extra_charge, products_quantity, products_model, products_image, products_price, products_date_available, products_weight, products_tax_class_id, manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); $product = tep_db_fetch_array($product_query); tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model, products_extra_charge, products_image, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_extra_charge']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "', now(), " . (empty($product['products_date_available']) ? "null" : "'" . tep_db_input($product['products_date_available']) . "'") . ", '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')"); $dup_products_id = tep_db_insert_id(); Should I add the products_specifications line between the existing lines.............like this $product_query = tep_db_query("select products_extra_charge, products_specifications, products_quantity, products_model, products_image, products_price, products_date_available, products_weight, products_tax_class_id, manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); $product = tep_db_fetch_array($product_query); tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_specifications, products_model, products_extra_charge, products_image, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_extra_charge']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "', now(), " . (empty($product['products_date_available']) ? "null" : "'" . tep_db_input($product['products_date_available']) . "'") . ", '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')");
  12. Thanks Jim. I'll check it out. Regards, Vale
  13. Maybe if you point me in the right direction I can play around with the problem. Regards, Vale
  14. Thanks Jim, we highly appreciate the time and effort you dedicate. Regards, dvale
  15. I just installed this great contribution and is working fine. But I noticed something on the data base after Duplicate Product in admin. As you know duplicate a product is a fast way to insert similar products. Once you do this, the module duplicates, (as many times you duplicate the product), all the entries in the db defining the specifications_id as 0 for all the extra unnecessary rows and columns. This is not affecting the functionality of the module but it creates a huge unwanted extra data information in the data base. Any suggestion?