Thank you sir! You are awsome!
[Contribution] Products Specifications
#501
Posted 03 July 2012 - 03:25 AM
#502
Posted 03 July 2012 - 08:30 AM
Edited by willer2k, 03 July 2012 - 08:31 AM.
#503
Posted 03 July 2012 - 08:30 AM
Hi Jim! I get this error message:
( ! ) Deprecated: Function ereg() is deprecated in C:\wamp\www\products_filter.php on line 177 Call Stack # Time Memory Function Location 1 0.0012 770248 {main}( ) ..\products_filter.php:0
It happens when I pick a filter, then I pick another filter, (like HONDA, then ACCORD), filter works fine, filters everything out, but I get this error message at the top of the screen, cant be good right? :/
Also, I cant give titles to my filters like such:
I need it like this:
Select make of your vehicle
[pulldown box]
Select model of your vehicle
[pulldown box]
Select year of your vehicle
[pulldown box]
Instead, I have this at the moment:
Make
Model
Year
Make
Model
Make
[Pulldown box]
[Pulldown box]
[Pulldown box]
Any suggestions??
#504
Posted 03 July 2012 - 04:47 PM
if ( (!isset($_GET['sort'])) || (!preg_match('/^[1-8][ad]$/i', $_GET['sort'])) || (substr($_GET['sort'], 0, 1) > sizeof($column_list)) ) {
I don't understand the second question. All Filters have titles that can be displayed. See the User's Manual section on setting up Filters. If that's not what you want, a link to the page or a screenshot might be useful.
Regards
Jim
Banners Box 2.3.x Support
Categories Accordion Box 2.3.x Support
Categories Images Box 2.2x 2.3.x Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.x Support
Get 1 Free 2.2x Support
jQuery Banner Rotator 2.2x 2.3.x Support
Modular Front Page 2.3.x Support
Modular SEO Header Tags 2.3.x Support
MVS 2.2x Support
PDF Datasheet 2.3.x Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.x Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.x Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x Support
#505
Posted 03 July 2012 - 08:49 PM
kymation, on 03 July 2012 - 12:28 AM, said:
If I had to guess, I would say a missing includes/functions/clean_code.php.
Regards
Jim
Jim, thank you, problem solved, I had forgot to add link to clean_code.php in application_top, seems to work fine now, I just need to style it, thanks again for your quick response.
#506
Posted 04 July 2012 - 06:54 AM
Hi jim! Thanks, the code fixed the problem!
This is what I meant :
http://postimage.org/image/5h8aolh5j/
I can't fix it...
I think it's me not configuring the contribution properly, I guess I can figure this one out, not such a big deal.
The major problems I am facing right now thou;
- When I filter the catalog for a specific vehicle, the filter works fine, but when I go to a different category, the filter is no longer filtering, the filter variables dont get passed along in the categories... So the prospect has to re-submit the attributes every time he switches categories.
I am using this contribution for an auto parts store, ideally, I need the prospect to be able to submit his vehicles information once [make mode and year] and then keep surfing all categories, see parts only for his vehicle.
-Second problem for me, the catalog is going to hold over 8000 products, is it possible to submit all attributes first, then hit "SEARCH" filter everything at once as oposed to filter the entire catalog when the prospect selects [vehicle make], then further filters when they select [vehicle models] and then a 3rd time whent he select [submodel] fallowed by [year], it will create delays and frustration for the client.
Are any of those fixable??
Thank You
-Alex
#507
Posted 04 July 2012 - 03:33 PM
To get the filters to carry over to a different category, you will need to pass the filter values in the URL in the Categories menu etc. This is normally not done because it doesn't make sense for most stores.
The default for filters is a Javascript that submits the filter as soon as it is selected. You can remove that, enclose the filters in a form, and add a submit button. This will submit all changes at once.
Regards
Jim
Banners Box 2.3.x Support
Categories Accordion Box 2.3.x Support
Categories Images Box 2.2x 2.3.x Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.x Support
Get 1 Free 2.2x Support
jQuery Banner Rotator 2.2x 2.3.x Support
Modular Front Page 2.3.x Support
Modular SEO Header Tags 2.3.x Support
MVS 2.2x Support
PDF Datasheet 2.3.x Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.x Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.x Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x Support
#508
Posted 06 July 2012 - 04:13 AM
Basically when I press to post the review it adds the item to my shopping cart.
So I read the form tags have to be in the right place and make sure there are no duplicates. I have looked through the product_info.php and /modules/product_reviews.php and I can't spot anything wrong.
I have compared to the installation files and everything seems to be ok, but it still happens.
I have looked at the page source in Firefox and it does show an error saying that there is a nested form tag which is not allowed.
I just don't know what it is...
#509
Posted 06 July 2012 - 04:59 AM
The error is most likely in product_info.php. Find the </form> tag and move it to just before this code:
<?php include_once (DIR_WS_MODULES . FILENAME_PRODUCTS_TABS); // End Products Specifications ?>
Regards
Jim
Banners Box 2.3.x Support
Categories Accordion Box 2.3.x Support
Categories Images Box 2.2x 2.3.x Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.x Support
Get 1 Free 2.2x Support
jQuery Banner Rotator 2.2x 2.3.x Support
Modular Front Page 2.3.x Support
Modular SEO Header Tags 2.3.x Support
MVS 2.2x Support
PDF Datasheet 2.3.x Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.x Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.x Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x Support
#510
Posted 06 July 2012 - 05:20 AM
Thanks, that partly solved the problem. It doesn't add to cart like before but now if kinda just refreshes the page. It adds this to the end of the url
?action=process&tab=review
The text entered in the reviews box is still there and the review doesn't appear for approval in admin.
Any suggestions what I should do?
Regards
Aleksander
Edited by al3ks, 06 July 2012 - 05:21 AM.
#511
Posted 06 July 2012 - 05:45 AM
Regards
Jim
Banners Box 2.3.x Support
Categories Accordion Box 2.3.x Support
Categories Images Box 2.2x 2.3.x Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.x Support
Get 1 Free 2.2x Support
jQuery Banner Rotator 2.2x 2.3.x Support
Modular Front Page 2.3.x Support
Modular SEO Header Tags 2.3.x Support
MVS 2.2x Support
PDF Datasheet 2.3.x Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.x Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.x Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x Support
#512
Posted 06 July 2012 - 06:03 AM
#513
Posted 06 July 2012 - 09:37 AM
Did you have any luck with this?, i have exactly the same thing is happening to my site but I cant figure out how to fix it. I have even removed all specifications and started again but get the same problem.
willer2k, on 03 July 2012 - 08:30 AM, said:
Also, I cant give titles to my filters like such:
I need it like this:
Select make of your vehicle
[pulldown box]
Select model of your vehicle
[pulldown box]
Select year of your vehicle
[pulldown box]
Instead, I have this at the moment:
Make
Model
Year
Make
Model
Make
[Pulldown box]
[Pulldown box]
[Pulldown box]
Any suggestions??
#515
Posted 10 July 2012 - 08:36 PM
I am having a problem with products filter infobox. I have tried alot of different variations but it always looks like image (link below). I can not figure out how to fix it. I have also shown how I have set the filters up in admin incase I am doing something wrong here.
http://postimage.org/image/wlknbfgcb/
I would be extremely greatful for any help.
#516
Posted 10 July 2012 - 11:05 PM
Regards
Jim
Banners Box 2.3.x Support
Categories Accordion Box 2.3.x Support
Categories Images Box 2.2x 2.3.x Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.x Support
Get 1 Free 2.2x Support
jQuery Banner Rotator 2.2x 2.3.x Support
Modular Front Page 2.3.x Support
Modular SEO Header Tags 2.3.x Support
MVS 2.2x Support
PDF Datasheet 2.3.x Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.x Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.x Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x Support
#517
Posted 11 July 2012 - 02:47 PM
Thanks for your reply, I have checked this in firebug on firefox and the only errors i get are for missing images (example below) which i have fixed and have no effect on the layout
http://postimage.org/image/7eiwf6cxt/
Below is my bm_product_filters.php (i think this is where the problem is) could you check it to see if I have deleted or changed something that I shouldn't have.
<?php
/*
$Id: bm_products_filter.php, v 1 20110717 kymation Exp $
$Loc: catalog/includes/modules/boxes/ $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2011 osCommerce
Released under the GNU General Public License
*/
class bm_products_filter {
var $code = 'bm_products_filter';
var $group = 'boxes';
var $title;
var $description;
var $sort_order;
var $enabled = false;
function bm_products_filter() {
$this->title = MODULE_BOXES_PRODUCTS_FILTER_TITLE;
$this->description = MODULE_BOXES_PRODUCTS_FILTER_DESCRIPTION;
if (defined('MODULE_BOXES_PRODUCTS_FILTER_STATUS')) {
$this->sort_order = MODULE_BOXES_PRODUCTS_FILTER_SORT_ORDER;
$this->enabled = (MODULE_BOXES_PRODUCTS_FILTER_STATUS == 'True');
$this->group = ((MODULE_BOXES_PRODUCTS_FILTER_CONTENT_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right');
}
}
function execute() {
global $current_category_id, $languages_id, $oscTemplate, $currencies;
require_once (DIR_WS_FUNCTIONS . 'products_specifications.php');
require_once (DIR_WS_CLASSES . 'specifications.php');
$spec_object = new Specifications();
$box_text = ''; //HTML string goes into the text part of the box
$specs_query_raw = "
select
s.specifications_id,
s.products_column_name,
s.filter_class,
s.filter_show_all,
s.filter_display,
sd.specification_name,
sd.specification_prefix,
sd.specification_suffix
from
" . TABLE_SPECIFICATION . " s
join " . TABLE_SPECIFICATION_DESCRIPTION . " sd
on (sd.specifications_id = s.specifications_id)
join " . TABLE_SPECIFICATION_GROUPS . " sg
on (sg.specification_group_id = s.specification_group_id)
join " . TABLE_SPECIFICATIONS_TO_CATEGORIES . " s2c
on (s2c.specification_group_id = sg.specification_group_id)
where
s2c.categories_id = '" . $current_category_id . "'
and s.show_filter = 'True'
and sg.show_filter = 'True'
and sd.language_id = '" . $languages_id . "'
order by
s.specification_sort_order,
sd.specification_name
";
// print $specs_query_raw . "<br>\n";
$specs_query = tep_db_query($specs_query_raw);
$first = true;
while ($specs_array = tep_db_fetch_array($specs_query)) {
// Retrieve the GET vars, sanitize, and assign to variables
// Variable names are the letter "f" followed by the specifications_id
$var = 'f' . $specs_array['specifications_id'];
$$var = '0';
if (isset ($_GET[$var]) && $_GET[$var] != '') {
// Decode the URL-encoded names, including arrays
$$var = tep_decode_recursive($_GET[$var]);
// Sanitize variables to prevent hacking
$$var = tep_clean_get__recursive($_GET[$var]);
// Get rid of extra values if Select All is selected
$$var = tep_select_all_override($$var);
}
$filters_query_raw = "
select
sf.specification_filters_id,
sfd.filter
from
" . TABLE_SPECIFICATIONS_FILTERS . " sf
join " . TABLE_SPECIFICATIONS_FILTERS_DESCRIPTION . " sfd
on (sfd.specification_filters_id = sf.specification_filters_id)
where
sf.specifications_id = '" . (int) $specs_array['specifications_id'] . "'
and sfd.language_id = '" . $languages_id . "'
order by
sf.filter_sort_order,
sfd.filter
";
// print $filters_query_raw . "<br>\n";
$filters_query = tep_db_query($filters_query_raw);
$count_filters = tep_db_num_rows($filters_query);
$filters_select_array = array ();
if ($count_filters >= MODULE_BOXES_PRODUCTS_FILTER_MINIMUM) {
$filters_array = array ();
if ($first == false) {
$box_text .= "<br>\n";
}
$first = false;
$box_label .= '<b>' . $specs_array['specification_name'] . '</b><br/>';
$filter_index = 0;
if ($specs_array['filter_show_all'] == 'True') {
$count = 1;
if (MODULE_BOXES_PRODUCTS_FILTER_NO_RESULT != 'normal' || MODULE_BOXES_PRODUCTS_FILTER_SHOW_COUNT == 'True') {
// Filter ID is set to 0 so no filter will be applied
$count = $spec_object->getFilterCount('0', $specs_array['specifications_id'], $specs_array['filter_class'], $specs_array['products_column_name']);
}
// The ID value must be set as a string, not an integer
$filters_select_array[$filter_index] = array (
'id' => '0',
'text' => TEXT_SHOW_ALL,
'count' => $count
);
$filter_index++;
}
$previous_filter = 0;
$previous_filter_id = 0;
while ($filters_array = tep_db_fetch_array($filters_query)) {
$filter_id = $filters_array['filter'];
if ($specs_array['products_column_name'] == 'products_price' || $specs_array['products_column_name'] == 'final_price') {
$previous_filter = $currencies->format($previous_filter);
$filter_text = $currencies->format($filters_array['filter']);
} else {
$filter_text = $specs_array['specification_prefix'] . ' ' . $filters_array['filter'] . ' ' . $specs_array['specification_suffix'];
}
if ($specs_array['filter_class'] == 'range') {
$filter_text = $previous_filter . ' - ' . $filter_text;
$filter_id = $previous_filter_id . '-' . $filters_array['filter'];
$previous_filter = $filters_array['filter'];
$previous_filter_id = $filters_array['filter'];
}
$count = 1;
if (MODULE_BOXES_PRODUCTS_FILTER_NO_RESULT != 'normal' || MODULE_BOXES_PRODUCTS_FILTER_SHOW_COUNT == 'True') {
$count = $spec_object->getFilterCount($filter_id, $specs_array['specifications_id'], $specs_array['filter_class'], $specs_array['products_column_name']);
}
$filters_select_array[$filter_index] = array ( 'id' => $filter_id , 'text' => $filter_text, 'count' => $count);
$filter_index++;
} // while ($filters_array
// For range class only, create a filter for maximum value +
if ($specs_array['filter_class'] == 'range') {
if ($specs_array['products_column_name'] == 'products_price' || $specs_array['products_column_name'] == 'final_price') {
$previous_filter = $currencies->format($previous_filter);
}
$count = 1;
if (MODULE_BOXES_PRODUCTS_FILTER_NO_RESULT != 'normal' || MODULE_BOXES_PRODUCTS_FILTER_SHOW_COUNT == 'True') {
$count = $spec_object->getFilterCount($previous_filter_id, $specs_array['specifications_id'], $specs_array['filter_class'], $specs_array['products_column_name']);
}
// $filters_select_array[$filter_index] = array ('id' => rawurlencode ($previous_filter_id),
$filters_select_array[$filter_index] = array (
'id' => ($previous_filter_id
), 'text' => $previous_filter . '+', 'count' => $count);
} // if ($specs_array['filter_class'] == 'range'
$box_text .= tep_get_filter_string($specs_array['filter_display'], $filters_select_array, FILENAME_PRODUCTS_FILTERS, $var, $$var);
if ($box_text != '<br clear=all>') {
$box_text = $box_label . $box_text;
}
} // if ($count_filters
} // while ($specs_array
if ($count_filters >= MODULE_BOXES_PRODUCTS_FILTER_MINIMUM) {
$oscTemplate->addBlock($box_text, $this->group);
}
}
function isEnabled() {
return $this->enabled;
}
function check() {
return defined('MODULE_BOXES_PRODUCTS_FILTER_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 Filter Box Module', 'MODULE_BOXES_PRODUCTS_FILTER_STATUS', 'True', 'Do you want to add the module to your shop?', '6', '0', '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_PRODUCTS_FILTER_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_PRODUCTS_FILTER_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, date_added) values ('Minimum Spec Filter', 'MODULE_BOXES_PRODUCTS_FILTER_MINIMUM', '2', 'The minimum number of filters needed to have the Filters box show up in the column', '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 ('Filter Show Count', 'MODULE_BOXES_PRODUCTS_FILTER_SHOW_COUNT', 'True', 'Show the number of products that the filter would return', '6', '4', '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 ('Filter No Result', 'MODULE_BOXES_PRODUCTS_FILTER_NO_RESULT', 'normal', 'What to show for a filter that would return no result.', '6', '5', 'tep_cfg_select_option(array(\'normal\', \'grey\', \'none\'), ', now())");
}
function remove() {
tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
}
function keys() {
$keys = array ();
$keys[] = 'MODULE_BOXES_PRODUCTS_FILTER_STATUS';
$keys[] = 'MODULE_BOXES_PRODUCTS_FILTER_CONTENT_PLACEMENT';
$keys[] = 'MODULE_BOXES_PRODUCTS_FILTER_SORT_ORDER';
$keys[] = 'MODULE_BOXES_PRODUCTS_FILTER_MINIMUM';
$keys[] = 'MODULE_BOXES_PRODUCTS_FILTER_SHOW_COUNT';
$keys[] = 'MODULE_BOXES_PRODUCTS_FILTER_NO_RESULT';
return $keys;
}
}
?>
Thank you for your help, I am beginning to pull my hair out trying to figure this out.
#518
Posted 11 July 2012 - 03:01 PM
Regards
Jim
Banners Box 2.3.x Support
Categories Accordion Box 2.3.x Support
Categories Images Box 2.2x 2.3.x Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.x Support
Get 1 Free 2.2x Support
jQuery Banner Rotator 2.2x 2.3.x Support
Modular Front Page 2.3.x Support
Modular SEO Header Tags 2.3.x Support
MVS 2.2x Support
PDF Datasheet 2.3.x Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.x Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.x Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x Support
#519
Posted 11 July 2012 - 03:18 PM
Regards
Jim
Banners Box 2.3.x Support
Categories Accordion Box 2.3.x Support
Categories Images Box 2.2x 2.3.x Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.x Support
Get 1 Free 2.2x Support
jQuery Banner Rotator 2.2x 2.3.x Support
Modular Front Page 2.3.x Support
Modular SEO Header Tags 2.3.x Support
MVS 2.2x Support
PDF Datasheet 2.3.x Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.x Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.x Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x Support









