Zen Cart Logo
Forums / All Other Contributions/Addons / Tabbed Products Contrib [WIP]

Tabbed Products Contrib [WIP]

Locked

Views: 9,425

Results 1 to 20 of 23
This thread is locked. New replies are disabled.
17 May 2006, 10:45 AM
#1
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Tabbed Products Contrib [WIP]

Ok, I've successfully got a tabbed products set up working, complete with admin backend and frontend. But I'm a bit confused on how to add this with Zen-Magic to the admin side because there is no templates folder like the frontend has.

So I had to make edits directly to "collect_info.php". How would I go about doing that properly ? Since there is no direct menu link to products.php, and it can only be reached by clicking on "add new product" or clicking on an existing product in the categories selection, it seems that I am forced to rewrite products.php to at least point to a new collect_info.php and a new update_info.php, as both of those required query changes. Also had to add a function to "functions/general.php" for "zen_get_products_description_additional", how would i do that with ZenMagic?

I've added a new field to "products_description" table called "products_description_additional" and Ive got it set to the second tab. In total, I've been trying to follow other tabbed sites and so far I've gotten:

Product Description | Additional Info & Specs | Additional Images | Customers also bought

The front end I used zen-magic on so its in my own template folder, but still since it is a modification, I am unsure how to make it work any other way besides forcing people to replace their products_display_info.php file in their template folder. Is this the proper way?

17 May 2006, 10:54 AM
#2
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Re: Tabbed Products Contrib [WIP]

WIP frontend Demo
I plan on improving the tab design, but a lot of it is css so it should be decently easy to modify.
Admin Panel Screenshots:

17 May 2006, 11:57 AM
#3
titangen avatar

titangen

Zen Follower

Join Date:
May 2005
Location:
Brussels belgium
Posts:
177
Plugin Contributions:
0

Re: Tabbed Products Contrib [WIP]

:thumbsup:

looks great !!

question multilanguage support ? htmlarea support ?

Thanks

17 May 2006, 1:39 PM
#4
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Re: Tabbed Products Contrib [WIP]

titangen:

:thumbsup:

looks great !!

question multilanguage support ? htmlarea support ?

Thanks

Multilanguage support: YES
HTMLArea/FCK support: YES

I made sure to encapsulate the full code with each tab.

17 May 2006, 1:48 PM
#5
bunyip avatar

bunyip

Totally Zenned

Join Date:
Sep 2004
Location:
Western Massachusetts
Posts:
2,361
Plugin Contributions:
1

Re: Tabbed Products Contrib [WIP]

As you've already noted, there aren't any override capabilities in the Admin section. So you just have to overwrite the original files (your collect_info.php being a good example).

Don't try to replace it with a differently-named file - it just means more work and having to overwrite other files to point to them correctly.

For the extra function, you can make a separate file for it and put it in the admin/includes/functions/extra_functions/ folder rather than modifying a core function file.

17 May 2006, 1:53 PM
#6
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,607
Plugin Contributions:
0

Re: Tabbed Products Contrib [WIP]

Q-

Make this a new product type!!! Then you can change the collect info and anything else associated with creating a product- and NO CORE FILE CHANGES :smile:

17 May 2006, 6:39 PM
#7
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Re: Tabbed Products Contrib [WIP]

Kim:

Q-

Make this a new product type!!! Then you can change the collect info and anything else associated with creating a product- and NO CORE FILE CHANGES :smile:

AHh good point.. i was thinking about how there was a Products and Products_Document, etc.. ok great.. then i will do that.. but I dont really know how to select a document product type or another one.. ive never changed my product type before. I just click new product and it loads the default one. How do you switch?

17 May 2006, 6:50 PM
#8
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Re: Tabbed Products Contrib [WIP]

Ohh i see now.. its a drop down next to the "Add New Product" button. Cool. Thanks Kim!

Now what do I name the extra_functions file?

The core function is in general.php. Does it matter what I name it? I think zen cart will just load all the functions it finds.. but im not sure.

18 May 2006, 12:02 AM
#9
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Re: Tabbed Products Contrib [WIP]

Ok, How about the file: /admin/includes/modules/update_product.php ? I have to modify that to use the new Product Type, is there no other way to do that?

18 May 2006, 2:04 AM
#10
bunyip avatar

bunyip

Totally Zenned

Join Date:
Sep 2004
Location:
Western Massachusetts
Posts:
2,361
Plugin Contributions:
1

Re: Tabbed Products Contrib [WIP]

It doesn't matter what you call the new functions file...as you suspected, they all get loaded.
As for the file /admin/includes/modules/update_product.php, if you look closer at the other folders under admin/includes/modules, you'll see that the update_product.php is overridden for the product_music type by putting a modifed version in the product_music folder.

18 May 2006, 3:20 AM
#11
scubes13 avatar

scubes13

New Zenner

Join Date:
Mar 2006
Posts:
17
Plugin Contributions:
0

Re: Tabbed Products Contrib [WIP]

Just wanted to say thank God for you guys! I saw this post and started drooling. I have a current project that was about to go into standy-by b/c we need to use this feature.

Thanks so much! I can't wait to put your hard work to good use!

Kevin L.

18 May 2006, 4:15 AM
#12
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Re: Tabbed Products Contrib [WIP]

bunyip:

It doesn't matter what you call the new functions file...as you suspected, they all get loaded.
As for the file /admin/includes/modules/update_product.php, if you look closer at the other folders under admin/includes/modules, you'll see that the update_product.php is overridden for the product_music type by putting a modifed version in the product_music folder.

You are absolutely right! Thanks! I'm about done with this product type now. I will most likely release tomorrow, i just want to make sure I make the tabs look good now

25 May 2006, 9:07 PM
#13
titangen avatar

titangen

Zen Follower

Join Date:
May 2005
Location:
Brussels belgium
Posts:
177
Plugin Contributions:
0

Re: Tabbed Products Contrib [WIP]

Hi qhome,

Can I try your contrib on my site ?

ps: my zen cart version is 1.2.5D is compatible ?

Thanks in advance

best regards

chris:thumbsup:

30 May 2006, 4:00 PM
#14
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Re: Tabbed Products Contrib [WIP]

I don't think it will be 1.2.5D compatible because its based on the new <div> setup that the product info screen uses in 1.3.x rather than the <table> based one that 1.2.x used.

I do have some "proper coding" questions tho.

I was thinking, that maybe instead of adding a new table to the database, would it be smarter/better to make it dynamic based on a "split" character in the actual product description?

For example: Have the custom product info page create a div loop for every time it reads "%%%Tab2Name" or something like that? This way, you could have as many tabs as you want, without editing the tpl file or adding more fields to the database. In fact that would make it a simple one file contrib that you simply place in your template folder.

I've got it working that way too, I guess I could do it both ways.. and call this cheater way the "lite" version :)

Any thoughts?

31 May 2006, 1:04 AM
#15
scubes13 avatar

scubes13

New Zenner

Join Date:
Mar 2006
Posts:
17
Plugin Contributions:
0

Re: Tabbed Products Contrib [WIP]

I like the idea of the delimiter in the product information. This makes it much simpler, and in my mind - much cleaner as well.

How would you provide the names of the Tabs? Would this be part of the delimiter as well? IE - %%%TAB2Name would be %%%Product_Info ???

Kevin L.

31 May 2006, 2:56 AM
#16
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Re: Tabbed Products Contrib [WIP]

well right now i have it working like this:
%%%TabName~~~

but its ugly for things like Froogle feeds. So I'd like a better split. And I wonder if I can use escape chars that won't be picked up normally like //TabName// or something. I have some more playing around to do.

31 May 2006, 2:39 PM
#17
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Re: Tabbed Products Contrib [WIP]

Tabbed Products Version 1: RELEASED

It has been uploaded to the downloads section, but will take a few days to be approved. You can find it up the "Product Type" category.

The released version only includes the "Full" version that includes the database change, not the "Lite" version that I am working on that will use delimiters instead of database tables.

1 Jun 2006, 7:55 PM
#18
scubes13 avatar

scubes13

New Zenner

Join Date:
Mar 2006
Posts:
17
Plugin Contributions:
0

Re: Tabbed Products Contrib [WIP]

qhome,

I uploaded the mod as stated. I even played with the language settings to change the two tabs that are available.

However, I can not get additional images to display in the Additional Images tab.

I have tested to make certain that standard product types work. And they do. If I do a General product type, and I upload the first image "test.jpg" via the browser, and then FTP "test_01.jpg" and "test_02.jpg" files up. This works.

But as soon as I do it for a Tabbed product type, it ceases to show the Additional Images.

Any thoughts?

Thanks!
Kevin L.

1 Jun 2006, 10:13 PM
#19
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Re: Tabbed Products Contrib [WIP]

scubes13:

qhome,

I uploaded the mod as stated. I even played with the language settings to change the two tabs that are available.

However, I can not get additional images to display in the Additional Images tab.

I have tested to make certain that standard product types work. And they do. If I do a General product type, and I upload the first image "test.jpg" via the browser, and then FTP "test_01.jpg" and "test_02.jpg" files up. This works.

But as soon as I do it for a Tabbed product type, it ceases to show the Additional Images.

Any thoughts?

Thanks!
Kevin L.

I think I broke it when I was updating a few things before release. I will take a look. In the mean time, I invite you to check out the new "LITE" version I made. Its 10 times more configurable and requires no db changes, all based on the above idea with Delimiters.

See the official Thread here: http://www.zen-cart.com/forum/showthread.php?t=37182

Please let me know which you like better. So far I'm thinking the Delimiter idea will be the one I continue to maintain due to its versatility.

2 Jun 2006, 1:24 AM
#20
tajul_ashyqin avatar

tajul_ashyqin

Zen Follower

Join Date:
Apr 2006
Location:
Labuan Island
Posts:
362
Plugin Contributions:
1

Re: Tabbed Products Contrib [WIP]

wow, nice job! but how did you change the border's layout that surrounding the add to cart button?! i like it very much...