Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Parts diagram display/changing the category listing fields

Parts diagram display/changing the category listing fields

Locked

Views: 2,348

Results 1 to 20 of 23
This thread is locked. New replies are disabled.
21 Feb 2008, 3:54 PM
#1
motocrazygd avatar

motocrazygd

New Zenner

Join Date:
Feb 2008
Posts:
30
Plugin Contributions:
0

Parts diagram display/changing the category listing fields

Hello everyone,

I'm still new to the forums so forgive if I ask something thats already been talked about. I did some searching here and it answered alot of my questions except this one...

I am trying to setup a parts website for a manufacturer therefore the ability to show a parts diagram picture and list parts underneath is required. I have the layout just the way I like it.

Link to my store

I would like to add some custom fields that can be changed in the admin per product.

I changed these files in the admin(thanks to a tutorial from another zen cart user!)
Admin side:

  • Collect_info.php
  • Preview_info.php
  • Update_product.php
    Catalog side:
  • main_teplate_vars.php
  • tpl_product_info_display.php

The fields works perfectly! Now how do I get it to display as a field on my parts page? Also, is there a way I can split the price from the add to cart button?

I will see if I can find a website we can use as an example.

21 Feb 2008, 4:04 PM
#2
marg avatar

marg

Totally Zenned

Join Date:
Mar 2004
Posts:
642
Plugin Contributions:
0

Re: Parts diagram display/changing the category listing fields

On your product_info page?

Marg

21 Feb 2008, 4:09 PM
#3
motocrazygd avatar

motocrazygd

New Zenner

Join Date:
Feb 2008
Posts:
30
Plugin Contributions:
0

Re: Parts diagram display/changing the category listing fields

No, the product listing pages. I've posted links below just to make sure we are talking about the same thing.

Not on this page

This page

21 Feb 2008, 4:28 PM
#4
marg avatar

marg

Totally Zenned

Join Date:
Mar 2004
Posts:
642
Plugin Contributions:
0

Re: Parts diagram display/changing the category listing fields

It gets a little complicated... You will be changing core files. I have done this, in a hacked manner.
What are you trying to pull out and where are you trying to put it? I can help you what I did to achieve this as I did..
Marg

21 Feb 2008, 4:33 PM
#5
motocrazygd avatar

motocrazygd

New Zenner

Join Date:
Feb 2008
Posts:
30
Plugin Contributions:
0

Re: Parts diagram display/changing the category listing fields

Ref # Part Name Spec. msrp Qty/add

What are the steps to do this?

I've gone through these already

21 Feb 2008, 4:55 PM
#6
marg avatar

marg

Totally Zenned

Join Date:
Mar 2004
Posts:
642
Plugin Contributions:
0

Re: Parts diagram display/changing the category listing fields

So You've added the spec field & msrp field to your database... This might be a tad daunting.. hehe
What table did you add the to?

21 Feb 2008, 4:58 PM
#7
motocrazygd avatar

motocrazygd

New Zenner

Join Date:
Feb 2008
Posts:
30
Plugin Contributions:
0

Re: Parts diagram display/changing the category listing fields

I added it to the product table... Which I think might not be such a good idea.

21 Feb 2008, 5:05 PM
#8
motocrazygd avatar

motocrazygd

New Zenner

Join Date:
Feb 2008
Posts:
30
Plugin Contributions:
0

Re: Parts diagram display/changing the category listing fields

Im up for a challenge though ;)

21 Feb 2008, 5:14 PM
#9
marg avatar

marg

Totally Zenned

Join Date:
Mar 2004
Posts:
642
Plugin Contributions:
0

Re: Parts diagram display/changing the category listing fields

OK... Open your /includes/index_filters/default_filter.php and copy and paste the whole thing to a new page and SAVE IT! Gotta be able to fix if things go bad...

Now find this:
// We are asked to show only specific category
$listing_sql = "select " . $select_column_list . " p.products_id, p.products_type,

add p.spec, p.msrp after the p.products_type, so the above looks like:

  $listing_sql = "select " . $select_column_list . " p.products_id, p.products_type, p.spec, p.msrp, 

I don't know if those are the names of the fields, so change them to the correct name. Mind your commas!

Let me know when you have done this
Marg

21 Feb 2008, 5:32 PM
#10
motocrazygd avatar

motocrazygd

New Zenner

Join Date:
Feb 2008
Posts:
30
Plugin Contributions:
0

Re: Parts diagram display/changing the category listing fields

Basically that piece of code is saying go find "x" table from the database right? Will we be using any of the data that I created for the admin section?

I used the ids to create the fields in the admin/product description section :
p.products_ref
p.products_msrp

21 Feb 2008, 5:37 PM
#11
marg avatar

marg

Totally Zenned

Join Date:
Mar 2004
Posts:
642
Plugin Contributions:
0

Re: Parts diagram display/changing the category listing fields

This is calling what you did in the admin....

I'm not sure I understand what you mean by used the ids to create a field. BUT did you add this info to the products_description table or products table?
If you added those tot the products_description table then you need to call the 2 new fields pd.products_ref, pd.products_msrp,
Marg

21 Feb 2008, 6:10 PM
#12
marg avatar

marg

Totally Zenned

Join Date:
Mar 2004
Posts:
642
Plugin Contributions:
0

Re: Parts diagram display/changing the category listing fields

Given up?
Marg

21 Feb 2008, 7:47 PM
#13
motocrazygd avatar

motocrazygd

New Zenner

Join Date:
Feb 2008
Posts:
30
Plugin Contributions:
0

Re: Parts diagram display/changing the category listing fields

No, they were added to just the products table.

"Given up?"

NEVER

21 Feb 2008, 8:45 PM
#14
marg avatar

marg

Totally Zenned

Join Date:
Mar 2004
Posts:
642
Plugin Contributions:
0

Re: Parts diagram display/changing the category listing fields

Welcome back!
OK... have you saved that part to your server?

21 Feb 2008, 9:10 PM
#15
marg avatar

marg

Totally Zenned

Join Date:
Mar 2004
Posts:
642
Plugin Contributions:
0

Re: Parts diagram display/changing the category listing fields

Since I wasn't using the "Display Product Manufacturer Name" or the "Display Product Weight" on the product listings, I used these to add my new items. I turned them on in the admin/configuration/product listing/Display...

I changed the heading to match my new items in includes/languages/english.php - I wrote new defines for my headings

Leave the headings for now and let's just get one of the new items to show up on your page.

/includes/modules/product_listing.php
Change the following line:
$lc_text = $listing->fields['products_weight'];
to:
$lc_text = $listing->fields['products_msrp'];

Do This and let me know,
Marg

21 Feb 2008, 10:55 PM
#16
motocrazygd avatar

motocrazygd

New Zenner

Join Date:
Feb 2008
Posts:
30
Plugin Contributions:
0

Re: Parts diagram display/changing the category listing fields

Ok, I did it....

21 Feb 2008, 10:58 PM
#17
marg avatar

marg

Totally Zenned

Join Date:
Mar 2004
Posts:
642
Plugin Contributions:
0

Re: Parts diagram display/changing the category listing fields

I'm not able to view that page any longer... are there any errors?
Marg

21 Feb 2008, 11:05 PM
#18
motocrazygd avatar

motocrazygd

New Zenner

Join Date:
Feb 2008
Posts:
30
Plugin Contributions:
0

Re: Parts diagram display/changing the category listing fields

Whoops... I posted the wrong link.

Here try this one.

The only error I can tell is a text formatting error on the description

21 Feb 2008, 11:18 PM
#19
marg avatar

marg

Totally Zenned

Join Date:
Mar 2004
Posts:
642
Plugin Contributions:
0

Re: Parts diagram display/changing the category listing fields

Things are missing from before... The Ref#
Is test the name of the item? Or is test what you wrote for the new field?

Oops... cross that... I see that the name and the description are both Test...
Where's the Ref#?

22 Feb 2008, 3:44 PM
#20
motocrazygd avatar

motocrazygd

New Zenner

Join Date:
Feb 2008
Posts:
30
Plugin Contributions:
0

Re: Parts diagram display/changing the category listing fields

Hmm... Not sure what I did wrong... the "weight" field is now working but the table isn't formatting right.