网络营销电子商务研究中心  
How to buy the best prescription safety glasses in Canada? Let's study!
Go Back   网络营销电子商务研究中心 > 网站建设 > ZenCart
User Name
Password
 
FAQ Members List Calendar Cheap Glasses

Reply
 
Thread Tools Display Modes
  #1   IP: 170.178.162.125
Old 2016-08-16, 07:38 AM
Wade Hampton Census Area Wade Hampton Census Area is offline
初级会员
 
Join Date: 2008-02-23
Posts: 1
Wade Hampton Census Area 现在声名狼藉
Default Adding a new product type

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 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.ph p.

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.
Reply With Quote
  #2   IP: 170.178.162.125
Old 2016-08-16, 07:39 AM
Wagon Mound Wagon Mound is offline
初级会员
 
Join Date: 2009-11-21
Posts: 1
Wagon Mound 现在声名狼藉
Default

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.
Reply With Quote
  #3   IP: 170.178.162.125
Old 2016-08-16, 07:40 AM
Wakenda Wakenda is offline
初级会员
 
Join Date: 2005-06-07
Posts: 1
Wakenda 现在声名狼藉
Default

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

Did you clone all the keys?

Code:
SELECT * FROM product_type_layout WHERE configuration_key LIKE '%_DOCUMENT_PRODUCT_%';
Then, did you update the main_template_vars.php ...
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do Product Type files work (Programmer View) Indian River Shores ZenCart 0 2016-08-16 07:34 AM
Adding a new Product Type in Zen Cart Illinois City ZenCart 0 2016-08-16 07:31 AM
Redirect to Product Page when only One product in category Pace X-Cart 2 2016-02-14 07:44 PM
Add a pop-up information box to describe a product option Randy X-Cart 1 2015-12-02 07:51 PM
Adding a "Second" Featured Product Section topvip X-Cart 0 2009-04-15 09:23 PM

Prescription-glasses.com offers prescription glasses online at discount prices.
All times are GMT +8. The time now is 11:07 AM.


Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.