Forums / Templates, Stylesheets, Page Layout / Turn artist into clickable link on product page?

Turn artist into clickable link on product page?

Views: 1,760

Results 1 to 11 of 11
27 Dec 2012, 11:52 AM
#1
doooomed avatar

doooomed

Zen Follower

Join Date:
Jun 2009
Posts:
275
Plugin Contributions:
0

Turn artist into clickable link on product page?

Not sure if this can be done but...

I would like my customers to be able to click on the name of the artist and have all product by that artist come up.

Example

  • Artist: Tiny Tim <--- The words Tiny Tim would be cickable to bring up all Tiny Tim products
  • Record Label: Acme Records
  • Music Genre: Heavy Metal

I am not very good with code and such but I can copy and paste with the best of 'em :laugh:

Any help would be great! Thank you!

27 Dec 2012, 2:28 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Turn artist into clickable link on product page?

doooomed:

Not sure if this can be done but...

I would like my customers to be able to click on the name of the artist and have all product by that artist come up.

Example

  • Artist: Tiny Tim <--- The words Tiny Tim would be cickable to bring up all Tiny Tim products
  • Record Label: Acme Records
  • Music Genre: Heavy Metal

I am not very good with code and such but I can copy and paste with the best of 'em :laugh:

Any help would be great! Thank you!

Use the "Product Type" = MUSIC.

Then, look under EXTRAS in your admin main menu, and you will be able to configure additional characteristics.

20 years a Zencart User

27 Dec 2012, 3:00 PM
#3
doooomed avatar

doooomed

Zen Follower

Join Date:
Jun 2009
Posts:
275
Plugin Contributions:
0

Re: Turn artist into clickable link on product page?

Thanks for the reply Schoolboy!

I think you misunderstood what I am asking.

I already have this

- Artist: Tiny Tim
  • Record Label: Acme Records
  • Music Genre: Heavy Metal

Now say I have 5 product pages for Tiny Tim, I would like customers to be able to click "Tiny Tim" and have all 5 listings come up.

Ajeh has previously shown me how to do this with record companies (http://www.zen-cart.com/showthread.php?194895-Record-companies-on-product-page) but I can't seem to make it work for record artists.

Any ideas?

Thanks!

28 Dec 2012, 8:15 PM
#4
doooomed avatar

doooomed

Zen Follower

Join Date:
Jun 2009
Posts:
275
Plugin Contributions:
0

Re: Turn artist into clickable link on product page?

Anyone on this? I'd really like to make this work but try as I might...:frusty: Thanks!

28 Dec 2012, 9:30 PM
#5
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Turn artist into clickable link on product page?

Let's backtrack for a minute. How do you have the products set up now?

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

29 Dec 2012, 5:03 PM
#6
doooomed avatar

doooomed

Zen Follower

Join Date:
Jun 2009
Posts:
275
Plugin Contributions:
0

Re: Turn artist into clickable link on product page?

Here is a picture to maybe explain better...

Attachment 11670

See how the Record Label is clickable? That will bring up all items from that record label. I am trying to to do the same with Artist. Ajeh had given me code and what to do to get Record Label to work like that but I have no idea how to make it work for Artist. Thank you!

31 Dec 2012, 2:35 PM
#7
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Turn artist into clickable link on product page?

Sorry for the delay.

No the image doesn't help. I should have been clearer with my question.

If you look at the Holzheimer site in my sig, you'll see the photos are linked into multiple categories. For instance, you can find photos of actor Johnny Depp under his name and under various movies.

I'm not familiar with the music product type, but it seems to me you should be able to create a category for "Tiny Tim" and link all the available items from that artist into that category.

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

2 Jan 2013, 10:42 AM
#8
doooomed avatar

doooomed

Zen Follower

Join Date:
Jun 2009
Posts:
275
Plugin Contributions:
0

Re: Turn artist into clickable link on product page?

Hi again,

I'm not sure we are on the same page as I don't think what I'm trying to do has anything to do with categories. In the admin section right next to Gift Certificate/Coupons you see Extras. If you hover over Extras you get choices and the top two are Record Artist and Record Company. If you go here... http://dxxxxmed.com/index.php?main_page=product_music_info&cPath=5_8&products_id=1554 (replace xxxx with oooo) you can see Record Company in action (to the left of add to cart button). This is not normally a clickable link. If you click on it all the product we have from that Record Company will appear. If you go to this thread... http://www.zen-cart.com/showthread.php?194895-Record-companies-on-product-page you can see how this was done. I would like to have the same thing for record artist but I have no idea what in the code needs to be altered to make that happen. Thank you for your time and effort...I do appreciate it!

15 Jan 2013, 10:56 PM
#9
jbible avatar

jbible

New Zenner

Join Date:
Apr 2008
Posts:
60
Plugin Contributions:
0

Re: Turn artist into clickable link on product page?

Add the following to \includes\modules\pages\product_music_info\main_template_vars_product_type.php

$products_artist_id = $artist->fields['artists_id'];
$products_record_company_id = $record_company->fields['record_company_id'];
$products_music_genre_id = $music_genre->fields['music_genre_id'];

Then in includes\templates\YOUR_TEMPLATE\templates\tpl_product_music_info_display.php
You can overwrite the original code with this for Artist, Record Company, Genre respectively.

<?php echo (($flag_show_product_music_info_artist == 1 and !empty($products_artist_name)) ? '<li>' . TEXT_PRODUCT_ARTIST .'<a href="' . zen_href_link(FILENAME_DEFAULT, '&typefilter=artist&artists_id=' . $products_artist_id) . '">' . $products_artist_name . '</li>' : '') . '</a>'; ?>

<?php echo (($flag_show_product_music_info_record_company == 1 and !empty($products_record_company_name)) ? '<li>' . TEXT_PRODUCT_RECORD_COMPANY . '<a href="' . zen_href_link(FILENAME_DEFAULT, '&typefilter=record_company&record_company_id=' . $products_record_company_id) . '">' . $products_record_company_name . '</li>' : '') . '</a>'; ?>

<?php echo (($flag_show_product_music_info_genre == 1 and !empty($products_music_genre_name)) ? '<li>' . TEXT_PRODUCT_MUSIC_GENRE . '<a href="' . zen_href_link(FILENAME_DEFAULT, '&typefilter=music_genre&music_genre_id=' . $products_music_genre_id) . '">' . $products_music_genre_name . '</li>' : '') . '</a>'; ?>
17 Jan 2013, 2:42 AM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Turn artist into clickable link on product page?

doooomed:

See how the Record Label is clickable? That will bring up all items from that record label. I am trying to to do the same with Artist. Ajeh had given me code and what to do to get Record Label to work like that but I have no idea how to make it work for Artist. Thank you!

Did you try this add on? It seems to do just what you want ...
http://www.zen-cart.com/downloads.php?do=file&id=806

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

22 Jan 2013, 5:09 PM
#11
doooomed avatar

doooomed

Zen Follower

Join Date:
Jun 2009
Posts:
275
Plugin Contributions:
0

Re: Turn artist into clickable link on product page?

jbible:

Add the following to \includes\modules\pages\product_music_info\main_template_vars_product_type.php

$products_artist_id = $artist->fields['artists_id'];
$products_record_company_id = $record_company->fields['record_company_id'];
$products_music_genre_id = $music_genre->fields['music_genre_id'];

> 
> Then in includes\templates\YOUR_TEMPLATE\templates\tpl_product_music_info_display.php
> You can overwrite the original code with this for Artist, Record Company, Genre respectively.
> 
> ```
<?php echo (($flag_show_product_music_info_artist == 1 and !empty($products_artist_name)) ? '<li>' . TEXT_PRODUCT_ARTIST .'<a href="' . zen_href_link(FILENAME_DEFAULT, '&typefilter=artist&artists_id=' . $products_artist_id) . '">' . $products_artist_name . '</li>' : '') . '</a>'; ?>

<?php echo (($flag_show_product_music_info_record_company == 1 and !empty($products_record_company_name)) ? '<li>' . TEXT_PRODUCT_RECORD_COMPANY . '<a href="' . zen_href_link(FILENAME_DEFAULT, '&typefilter=record_company&record_company_id=' . $products_record_company_id) . '">' . $products_record_company_name . '</li>' : '') . '</a>'; ?>

<?php echo (($flag_show_product_music_info_genre == 1 and !empty($products_music_genre_name)) ? '<li>' . TEXT_PRODUCT_MUSIC_GENRE . '<a href="' . zen_href_link(FILENAME_DEFAULT, '&typefilter=music_genre&music_genre_id=' . $products_music_genre_id) . '">' . $products_music_genre_name . '</li>' : '') . '</a>'; ?>

This works PERFECT! Thank you!!!