Zen Cart Logo
Forums / Basic Configuration / Creating an Artists Search box

Creating an Artists Search box

Locked

Views: 2,190

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
11 Dec 2007, 4:30 PM
#1
jmouse avatar

jmouse

New Zenner

Join Date:
Mar 2007
Posts:
53
Plugin Contributions:
0

Creating an Artists Search box

I am trying to create an Record Artists search box.

I have taken the record companies search and modified that.

  • I have a record_artists sidebox in the sideboxes directory
  • I have a template for it
  • I have set up some new constants for controlling lengths.

It displays fine on the front page, but if I click on an artist I get a blank page - which usually means a code error somewhere.

Looking at the template file, I realise I don't know where it goes after the listitem is clicked - have I missed changing something? and if not, where should I look for my mistake.

Thanks

19 Apr 2008, 6:37 PM
#2
silver_kamel avatar

silver_kamel

New Zenner

Join Date:
Oct 2006
Posts:
39
Plugin Contributions:
0

Re: Creating an Artists Search box

Greetings,
Did you ever resolve your issues?

I am trying to add an Artist sidebox also..

I have copied from record_companies and created/modified:
\modules\sideboxes\artists.php
\index_filters\artist_filter.php
\templates\template_default\sideboxes\tpl_artists_select.php
\language\chrome(my custom template)\english.php

The box shows on my test website www.reggaemp3.us but there are no Artists listed in the box although if you select a line showing '..' it will go to the artists products.

Any advice anyone can give will be greatly appreciated.

'Live' site is www.reggae-mp3.com.. Thanx..... Kamel :cool:

4 Jun 2008, 8:52 AM
#3
pytelcz avatar

pytelcz

New Zenner

Join Date:
Nov 2006
Posts:
4
Plugin Contributions:
0

Re: Creating an Artists Search box

you need to add row to a get_terms_to_filter table. Try this one:
insert into get_terms_to_filter values ('artists_id', 'TABLE_RECORD_ARTISTS', 'artists_name')

5 Jun 2008, 6:21 PM
#4
silver_kamel avatar

silver_kamel

New Zenner

Join Date:
Oct 2006
Posts:
39
Plugin Contributions:
0

Re: Creating an Artists Search box

Thanx for your input

I will be trying that later...

Kamel

www.silverkamel.com www.reggae-mp3.com

18 Jun 2008, 1:26 AM
#5
silver_kamel avatar

silver_kamel

New Zenner

Join Date:
Oct 2006
Posts:
39
Plugin Contributions:
0

Re: Creating an Artists Search box

Hi PytelCZ

I tried to put the ,'TABLE_RECORD_ARTISTS','artists_name' after 'artists_id" in the artists_filter.php but it didn't work..

I tried searching for a 'get_terms_to_filter' section but could not find it in the files I have changed...

What am I missing here?

I still get artist listings but cannot see their names in the drop down menu..

Any help greatly appreciated.

Kamel

18 Jun 2008, 1:50 PM
#6
silver_kamel avatar

silver_kamel

New Zenner

Join Date:
Oct 2006
Posts:
39
Plugin Contributions:
0

Re: Creating an Artists Search box

In the record_artists.php I notice the ".." item on line 30:

// Display a list
$record_artists_array = array();
if (!isset($_GET['artists_id']) || $_GET['artists_id'] == '' ) {
$record_artists_array[] = array('id' => '', 'text' => PULL_DOWN_ALL);
} else {
$record_artists_array[] = array('id' => '', 'text' => PULL_DOWN_RECORD_ARTISTS);
}
while (!$record_artists->EOF) {
$artists_name = ((strlen($record_artists->fields['artists_name']) > MAX_DISPLAY_ARTISTS_NAME_LEN) ? substr($record_artists->fields['artists_name'], 0, MAX_DISPLAY_ARTISTS_NAME_LEN) . '..' : $record_artists->fields['artists_name']);
$record_artists_array[] = array('id' => $record_artists->fields['artists_id'],
'text' => $artists_name);

At the end is the statement about putting 'text' instead of the '..' for the artists_name... but it does not..

Whats a little confusing is that while the 'record_company' value remains a constant for tables, names, and ids, 'record_artists' becomes 'artist_name' and artist_id..

The box is there, the products list when '..' is chosen.. when I view source on the page there is no value in the list although all the option vales are.

Any help greatly appreciated by myself and my site visitors.. Kamel

18 Jun 2008, 9:35 PM
#7
silver_kamel avatar

silver_kamel

New Zenner

Join Date:
Oct 2006
Posts:
39
Plugin Contributions:
0

Re: Creating an Artists Search box

pytelCZ:

you need to add row to a get_terms_to_filter table. Try this one:
insert into get_terms_to_filter values ('artists_id', 'TABLE_RECORD_ARTISTS', 'artists_name')

I went to myPHPadmin, added a row and the values... i crossed my fingers but still no 'text' in my artist sidebox...

Other solutions I see here are actually using record companies or manufacturers side boxes.. Record company i use and manufacturers is not an option in the product page... So i am stuck trying to solve this problem..

I will be most happy to publish the solution to all who might need it..

Jah Bless

Kamel