Forums / Setting Up Categories, Products, Attributes / Adding a new product type

Adding a new product type

Locked

Started by dbrewster on 11 May 2006, 9:24 PM · Views: 7,542

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
11 May 2006, 9:24 PM
#1
dbrewster avatar

dbrewster

Zen Follower

Join Date:
Jul 2005
Location:
Charlottesville, VA
Posts:
376
Plugin Contributions:
0

Adding a new product type

Howdy.

I've been working on adding a new product type, because it may need to undergo customization, and because its original product type, "document_product" was subverted to other uses in my main store.

It's going to be for registering for events such as our national conference.

I have been studying "An Introduction to Product Types in Zen Cart v.1.2" which was included in the last 1.3 release. I've also peeked at the archived discussion http://www.zen-cart.com/forum/showthread.php?t=6888 but I confess I have not read all 8 pages of it yet. I also noticed the books model contrib, but didn't want to add complexities of additional features just yet.

My plan is to start by duplicating Document-Product and get that working before any customization, so I can get a better grasp of the ZC system.

So far I have successfully set up the Admin portion. I have edited database tables product_type and product_type_layout to create a new product type called "document_register".

Problem: the page does not display for customers.

I can create a category called Registration, limit it to type document_register, and create products in it. The products go into the zen_products table and that looks hunky dory. (I got a SQL output of product_layout, studied it, and made SQL insert statements for the rows for my new product type, using product_type_id value 6.)

I've been combing over the /includes/modules/pages files but can't find where I've gone wrong. I've basically mirrored all the original files for document_product. I also changed all the references to "document_product" to "document_register" in includes\modules\pages\document_register_info\main_template_vars.php and includes\modules\pages\document_register_info\main_template_vars_product_type.php.

You can see my sandbox at http://www.coreknowledge.org/register

Click the Register category on the left. You see that there is a product in there called "National Conference 2007" but nothing displays.

MANY MANY thanks to anyone who can point me in the right direction.

---Diana

12 May 2006, 3:13 PM
#2
dbrewster avatar

dbrewster

Zen Follower

Join Date:
Jul 2005
Location:
Charlottesville, VA
Posts:
376
Plugin Contributions:
0

Re: Adding a new product type

AH! I think I got it working finally.

http://coreknowledge.org/register

Had to comb thru all the converted document_product files and be sure I changed all the references to document_register so it pulled the right info out of the product_type_layout table.

Hope this info proves useful to someone else in the future! Just gotta keep rubbing brain cells together and ... use my very best friend,

admin > tools > Developers Tool Kit

what I did was, I searched on all DOCUMENT_PRODUCT references, to see if any were still showing up in my new DOCUMENT_REGISTER product type.

Essentially, so far, all I"ve done is copy Document - Product to a new type, Document - Register, but now I'm in position to customize if needed.

My current problem: this is a virtual product, so quantity in stock is irrelevant, but I'm seeing an "out of stock" image.

---Diana

9 Aug 2006, 1:26 PM
#3
femur avatar

femur

New Zenner

Join Date:
Mar 2004
Posts:
16
Plugin Contributions:
1

Re: Adding a new product type

Hi, just checked your zencart bookstore and that's exactly what i need to do for mine!
how you were able to create a book type? and are you using EZPopulate?

Regards

Mauro

9 Aug 2006, 10:32 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Adding a new product type

Did you build a gang of settings like the Document - Product for the product_type_layout table?

Did you clone all the keys?

SELECT * FROM product_type_layout WHERE configuration_key LIKE '%_DOCUMENT_PRODUCT_%';

Then, did you update the main_template_vars.php ...

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!

21 Aug 2006, 2:22 PM
#5
sae avatar

sae

New Zenner

Join Date:
Apr 2006
Posts:
19
Plugin Contributions:
0

Re: Adding a new product type

I am currently working on a registration portion for my website and I was wondering how you set up the collecting of registration information? Also, do you send an email to the registees? How did you make a custom email?