网络营销电子商务研究中心  
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:44 AM
Wallins Creek Wallins Creek is offline
初级会员
 
Join Date: 2006-07-22
Posts: 1
Wallins Creek 现在声名狼藉
Default Creating a new General Product Type

Technical documentation on Product Types:
http://tutorials.zen-cart.com/index.php?article=114

A wiki article with similar content:
http://www.zen-cart.com/wiki/index.php/Product_Types

A related Forum Thread: http://www.zen-cart.com/forum/showthread.php?t=6888
Reply With Quote
  #2   IP: 170.178.162.125
Old 2016-08-16, 07:45 AM
Walnut Grove Walnut Grove is offline
初级会员
 
Join Date: 2009-12-21
Posts: 1
Walnut Grove 现在声名狼藉
Default

The files that the general Product Type uses are:

/admin/product.php
/admin/includes/modules/product/collect_info.php
/admin/includes/modules/product/collect_info_metatags.php
/admin/includes/modules/product/preview_info.php
/admin/includes/modules/product/preview_info_meta_tags.php
/admin/includes/modules/***/update_product.php
/admin/includes/modules/***/update_product_meta_tags.php
/admin/includes/modules/***/copy_to_confirm.php
/admin/includes/modules/***/delete_product_confirm.php
/admin/includes/modules/***/move_product_confirm.php
(and other files in the /admin/includes/modules/ folder as necessary)
/includes/modules/pages/product_info/header_php.php
/includes/modules/pages/product_info/jscript_main.php
/includes/modules/pages/product_info/jscript_textarea_counter.js
/includes/modules/pages/product_info/main_template_vars.php
/includes/modules/pages/product_info/main_template_vars_product_type.php
/includes/templates/YOURTEMPLATE/templates/tpl_product_info_display.php
/includes/templates/YOURTEMPLATE/templates/tpl_product_noproducts.php


The collect_info script is used to display the input fields to add/edit products.
The preview_info script is for ... previewing the content for submission.
The update_product script is for saving the information after preview.
The other scripts are used for manipulating data.
The various files in the /admin/includes/modules folder are shared among all product types. If a given product type needs to "override" the default behavior, the original can be copied into the subdirectory named for that product type.

The product_music type is an example of using external tables to store related data, allowing the collection/editing of that data in the admin, and the display of that data in the storefront template.

Your case may not need the several different tables that the music stuff does, but if you pared it down to just one table, you'd be set.
Reply With Quote
  #3   IP: 170.178.162.125
Old 2016-08-16, 07:46 AM
Walworth Walworth is offline
初级会员
 
Join Date: 2013-12-13
Posts: 1
Walworth 现在声名狼藉
Default

"product_general" is actually named "product". General is just a friendly name, not an actual word used in filenames/scripts.

It's all keyed from the type-handler defined in the product_types table for that product type entry.
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
Adding a new product type Wade Hampton Census Area ZenCart 2 2016-08-16 07:40 AM
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

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


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