Forums / Templates, Stylesheets, Page Layout / Sidebox like Manufacturer but not able to search

Sidebox like Manufacturer but not able to search

Views: 1,663

Results 1 to 14 of 14
30 Nov 2015, 5:56 AM
#1
mandeepmavi avatar

mandeepmavi

New Zenner

Join Date:
Dec 2010
Posts:
32
Plugin Contributions:
0

Sidebox like Manufacturer but not able to search

Hi, I was trying to create new Sidebox like Manufacturer, I am able to do so. Able to see list as Manufacturer,
But it is not searching like Manufacturers.
Any idea which file Manufacturer sidebox use to make search.
Regards

30 Nov 2015, 9:07 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Sidebox like Manufacturer but not able to search

A copy of for your template
includes/templates/template_default/sideboxes/tpl_manufacturers_select.php
and
includes/modules/sideboxes/manufacturers.php

Zen-Venom Get Bitten

30 Nov 2015, 4:15 PM
#3
mandeepmavi avatar

mandeepmavi

New Zenner

Join Date:
Dec 2010
Posts:
32
Plugin Contributions:
0

Re: Sidebox like Manufacturer but not able to search

I did these, it is in e-commerce and all suppliers are there in list, But it is unable to get products belong to them.
Want to know if file includes/index_filters/default_filter.php can help to search results for suppliers.
Regards

1 Dec 2015, 4:54 PM
#4
mandeepmavi avatar

mandeepmavi

New Zenner

Join Date:
Dec 2010
Posts:
32
Plugin Contributions:
0

Re: Sidebox like Manufacturer but not able to search

--/index.php?main_page=index&manufacturers_id=1, unable to understand from which file this one is getting result

1 Dec 2015, 5:56 PM
#5
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Sidebox like Manufacturer but not able to search

But it is unable to get products belong to them.
Have you defined in your admin>catalog/products > entries that a product belongs to a particular manufacturer?

Zen-Venom Get Bitten

1 Dec 2015, 7:33 PM
#6
mandeepmavi avatar

mandeepmavi

New Zenner

Join Date:
Dec 2010
Posts:
32
Plugin Contributions:
0

Re: Sidebox like Manufacturer but not able to search

Yes Kobra, I am trying to create new side box for supplier. As said. I am able to see new sidebox supplier in e-commerce.
I noticed If defined product for Manufacturer are coming through two files- default_filter.php and tpl_manufacturers_select.php .
But unable to understand how manufacturer_id move from tpl_manufacturers_select.php to default_filter.php.

If I change manufacture_id to supplier_id in both files, Then My new sidebox Supplier start giving products.
Like
in tpl_manufacturers_select.php
$content .= zen_draw_pull_down_menu('manufacturers_id', $manufacturer_sidebox_array, (isset($_GET['manufacturers_id']) ? $_GET['manufacturers_id'] : ''), 'onchange="this.form.submit();" size="' . MAX_MANUFACTURERS_LIST . '" style="width: 90%; margin: auto;"') . zen_hide_session_id();
to
$content .= zen_draw_pull_down_menu('suppliers_id', $manufacturer_sidebox_array, (isset($_GET['manufacturers_id']) ? $_GET['manufacturers_id'] : ''), 'onchange="this.form.submit();" size="' . MAX_MANUFACTURERS_LIST . '" style="width: 90%; margin: auto;"') . zen_hide_session_id();

and
in default_filter.php
if (isset($_GET['manufactures_id']) && $_GET['brands_id'] != '' ) {
to

if (isset($_GET['suppliers_id']) && $_GET['brands_id'] != '' ) {

2 Dec 2015, 1:07 AM
#7
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Sidebox like Manufacturer but not able to search

I suggest that you start by cloning/copying these two files
includes/templates/template_default/sideboxes/tpl_manufacturers_select.php
and
includes/modules/sideboxes/manufacturers.php
renaming them to
includes/templates/template_default/sideboxes/tpl_suppliers_select.php
and
includes/modules/sideboxes/suppliers.php

Edit the code within them to reflect "suppliers"

Zen-Venom Get Bitten

26 Dec 2015, 11:21 PM
#8
mandeepmavi avatar

mandeepmavi

New Zenner

Join Date:
Dec 2010
Posts:
32
Plugin Contributions:
0

Re: Sidebox like Manufacturer but not able to search

HI Kobra, I did this but no luck.
want to know what is MAX_DISPLAY_MANUFACTURER_NAME_LEN. seems it getting Length from database.
But I change this to MAX_DISPLAY_SUPPLIER_NAME_LEN.
I only get .. as supplier list.
But if i use MAX_DISPLAY_MANUFACTURER_NAME_LEN I am able to get all suppliers in list but not its products.

still no luck to get suppliers related products.
Regards

27 Dec 2015, 4:21 AM
#9
mandeepmavi avatar

mandeepmavi

New Zenner

Join Date:
Dec 2010
Posts:
32
Plugin Contributions:
0

Re: Sidebox like Manufacturer but not able to search

in /includes/templates/template_default/sideboxes/tpl_brands_select.php
if I am changing manufacturers_id to suppliers_id gives nothing

$content .= zen_draw_pull_down_menu('manufacturers_id', $supplier_sidebox_array, (isset($_GET['suppliers_id']) ? $_GET['supliers_id'] : ''), 'onchange="this.form.submit();" size="' . MAX_SUPLIERS_LIST . '" style="width: 90%; margin: auto;"') . zen_hide_session_id();

27 Dec 2015, 9:27 AM
#10
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Sidebox like Manufacturer but not able to search

If you have cloned the files you now need to create the Database tables for suppliers

suppliers
suppliers_info

Then the code to display in your admin

Zen-Venom Get Bitten

27 Dec 2015, 4:33 PM
#11
mandeepmavi avatar

mandeepmavi

New Zenner

Join Date:
Dec 2010
Posts:
32
Plugin Contributions:
0

Re: Sidebox like Manufacturer but not able to search

I copied tables from Manufacturer. and added extra column Manufacturer_id in Supplier. To get Manufacturer's supplier

27 Dec 2015, 7:58 PM
#12
mandeepmavi avatar

mandeepmavi

New Zenner

Join Date:
Dec 2010
Posts:
32
Plugin Contributions:
0

Re: Sidebox like Manufacturer but not able to search

I noticed manufacturer_id travel tpl_manufacturers_select.php to default_filter.php

made some changes in default_filter.php but no luck

31 Dec 2015, 12:58 AM
#13
mandeepmavi avatar

mandeepmavi

New Zenner

Join Date:
Dec 2010
Posts:
32
Plugin Contributions:
0

Re: Sidebox like Manufacturer but not able to search

I insert some values in database. able to see brand name. but not related products. only getting

There are no products to list in this category.

31 Dec 2015, 9:50 PM
#14
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Sidebox like Manufacturer but not able to search

only getting
There are no products to list in this category.
Where (what table) did you add items to?
What you have been seeking is not a product or a category so I am confused by your display

Zen-Venom Get Bitten