krugeros
-
Posts
6 -
Joined
-
Last visited
-
Days Won
1
Posts posted by krugeros
-
-
Hi there,
I’m looking the solution to below problem concerning manufacturers dropdown in product listing after selecting category or subcategory.
Let’s say that category tree is like this:
Angels
----> Figures---> small Figures--> big Figures----> CardsProblem description:
If I select category “small Figures” manufacturer box appears above product list :
__________________________________________
Show: All manufacturersAngels--> Figures-->small Figures--> big Figures__________________________________________
and I can select all manufacturers from this category.
But when I move to higher category – Figures ( this category has no products – only subcategories ) I can not choose manufacturer because box manufacturers is not showing.
I use Show All Products in Category & Subcategories V1.0 link contribution – that means if I select Angels category I see all products from subcategries listed as in product listing. But unfortunately I’m not able to select manufacturers for all product from subcategories.
Just to summarise:
- I would like to be albe to select every manufacturer from dropdown that appears in every level of category tree for all products in that category and subcategories.
- make the box manufactuers apear in all categories ( this is in the code if (tep_db_num_rows($filterlist_query) > 1) presented above )
I’ve searched for contribution that is doing this but with no luck.
Anyone who knows how to solve it please help :rolleyes: I’m struggling with this for 2 days.
During my research I’ve found a code that’s responsible for showing this box in index.php:
// optional Product List Filter if (PRODUCT_LIST_FILTER > 0) { if (isset($HTTP_GET_VARS['manufacturers_id'])) { $filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name"; } else { $filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name"; } $filterlist_query = tep_db_query($filterlist_sql); if (tep_db_num_rows($filterlist_query) > 1) { echo ' <td align="center" class="main">' . tep_draw_form('filter', FILENAME_DEFAULT, 'get') . TEXT_SHOW . ' '; if (isset($HTTP_GET_VARS['manufacturers_id'])) { echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']); $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES)); } else { echo tep_draw_hidden_field('cPath', $cPath); $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS)); } echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']); while ($filterlist = tep_db_fetch_array($filterlist_query)) { $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']); } echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"'); echo tep_hide_session_id() . '</form></td>' . "\n"; } }
-
hi there,
try this:
in catalog\ext\modules\payment\paypal\express.php find :
// select cheapest shipping method
$shipping = $shipping_modules->cheapest();
$shipping = $shipping['id'];
}
}
if (strpos($shipping, '_')) {
list($module, $method) = explode('_', $shipping);
if ( is_object($$module) || ($shipping == 'free_free') ) {
if ($shipping == 'free_free') {
$quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE;
$quote[0]['methods'][0]['cost'] = '0';
} else {
$quote = $shipping_modules->quote($method, $module);
}
if (isset($quote['error'])) {
tep_session_unregister('shipping');
tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
} else {
if ( (isset($quote[0]['methods'][0]['title'])) && (isset($quote[0]['methods'][0]['cost'])) ) {
$shipping = array('id' => $shipping,
'title' => (($free_shipping == true) ? $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')'),
'cost' => $quote[0]['methods'][0]['cost']);
}
}
}
}
and replace with this :
// load the selected shipping module
require(DIR_WS_CLASSES . 'shipping.php');
$shipping_modules = new shipping($shipping);
require(DIR_WS_CLASSES . 'order_total.php');
$order_total_modules = new order_total;
Works fine with my shop.
manufacturers dropdown for all products in selected category and subcategory
in General Add-Ons Support
Posted
I've found a site http://www.bfafoodservice.com/store that works just as I want my site to work.
Anybody knows how to do it ?