-
Re: Product Type Documentation
Before I embark on what looks like a bit of a headache to get right .. is there an easy fix to my issue ? I want to be able to have stock showing on one category , but not another , so My initial thought was to change the product type to use the different configuration options. While still using the Product-General type layout. After reading a little bit it seems like a headache I could really do without , so if there is a simpler solution , or someone has already cloned Product-General and can just pass me the file set , I would be very grateful .
Thanks.
-
Re: Adding New Product_types - Issue with sidebox
I'm working on adding an additional product type in a redesign of one of my customer's sites. First of all, I'm doing this specifically to add new filters, no new fields, at least at this time are planned for the product_info.
I've been totally successful in every area except the sidebox, and my issue is baffling to me. The list of names of my fields are not displaying, instead two little dots, that by the way do take me to the correctly link.
Again, in the admin all is perfect, so I know my tables are designed correctly; however I double checked (actually triple checked) to be sure all variables match my code. The extras box displays just perfect to include the names of the fields, but not in the catalog sidebox.
I'm actually adding two filters, but for the moment working on just one on the catalog side (the other one is next).
Here are my two new tables in question:
Code:
Table structure for table `zen_departments`
`departments_id` int(11) NOT NULL auto_increment,
`departments_name` varchar(32) NOT NULL,
`date_added` datetime default NULL,
`last_modified` datetime default NULL,
PRIMARY KEY (`departments_id`),
KEY `idx_departments_name_zen` (`departments_name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
Dumping data for table `zen_departments`
--
INSERT INTO `zen_departments` (`departments_id`, `departments_name`, `date_added`, `last_modified`) VALUES
(1, 'Men', '2008-11-11 14:27:50', NULL),
(2, 'Women', '2008-11-11 14:27:50', NULL),
(3, 'Girls', '2008-11-13 23:53:43', '2008-11-23 11:26:43'),
(4, 'Boys', '2008-11-13 23:53:48', '2008-11-23 11:28:17'),
(5, 'Infants', '2008-11-13 23:54:19', '2008-11-22 18:49:31');
Code:
Table structure for table `zen_product_shoes_extra`
`products_id` int(11) NOT NULL default '0',
`departments_id` int(11) NOT NULL default '0',
`style_id` int(11) NOT NULL default '0',
PRIMARY KEY (`products_id`),
KEY `idx_departments_id_zen` (`departments_id`),
KEY `idx_style_id_zen` (`style_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
(dump not relative for our purpose here)
My modules/sideboxes/departments.php code:
PHP Code:
<?php
/**
* departments sidebox - displays list of available departments to filter on
*
* @package templateSystem
* @copyright Copyright 2003-2005 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: departments.php 2834 2006-01-11 22:16:37Z birdbrain $
*/
error_reporting(E_ALL);
$departments_query = "select departments_id, departments_name
from " . TABLE_DEPARTMENTS . "
order by departments_name";
$departments = $db->Execute($departments_query);
if ($departments->RecordCount()>0) {
$number_of_rows = $departments->RecordCount()+1;
// Display a list
$departments_array = array();
if (!isset($_GET['departments_id']) || $_GET['departments_id'] == '' ) {
$departments_array[] = array('id' => '', 'text' => PULL_DOWN_ALL);
} else {
$departments_array[] = array('id' => '', 'text' => PULL_DOWN_DEPARTMENTS);
}
while (!$departments->EOF) {
$departments_name = ((strlen($departments->fields['departments_name']) > MAX_DISPLAY_DEPARTMENTS_NAME_LEN) ? substr($departments->fields['departments_name'], 0, MAX_DISPLAY_DEPARTMENTS_NAME_LEN) . '..' : $departments->fields['departments_name']);
$departments_array[] = array('id' => $departments->fields['departments_id'],
'text' => $departments_name);
$departments->MoveNext();
}
require($template->get_template_dir('tpl_departments_select.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_departments_select.php');
$title = '<label>' . BOX_HEADING_DEPARTMENTS . '</label>';
$title_link = false;
require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
}
?>
Next this is my departments_filter.php code
PHP Code:
<?php
/**
* departments_filter.php for index filters
*
* index filter for the shoe product type
* show the products of a specified departments ie: mens/womens etc.
*
* @package productTypes
* @copyright Copyright 2003-2007 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @todo Need to add/fine-tune ability to override or insert entry-points on a per-product-type basis
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: departments_filter.php 6912 2008-11-22 02:23:45Z rwoody $
*/
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
if (!isset($select_column_list)) $select_column_list = "";
// show the products of a specified departments
if (isset($_GET['departments_id']))
{
if (isset($_GET['filter_id']) && zen_not_null($_GET['filter_id']))
{
// We are asked to show only a specific category
$listing_sql = "select " . $select_column_list . " p.products_id, p.products_type, p.master_categories_id, p.products_price, p.products_tax_class_id, pd.products_description, if(s.status = 1, s.specials_new_products_price, NULL) AS specials_new_products_price, IF(s.status = 1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status
from " . TABLE_PRODUCTS . " p, " .
TABLE_PRODUCTS_DESCRIPTION . " pd, " .
TABLE_PRODUCT_SHOES_EXTRA . " pse left join " . TABLE_SPECIALS . " s on pse.products_id = s.products_id, " .
TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " .
TABLE_DEPARTMENTS . " d
where d.departments_id = '" . (int)$_GET['departments_id'] . "'
and p.products_id = pse.products_id
and p.products_status = 1
and pse.departments_id = '" . (int)$_GET['departments_id'] . "'
and pse.products_id = p2c.products_id
and pd.products_id = p2c.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and p2c.categories_id = '" . (int)$_GET['filter_id'] . "'";
} else {
// We show them all
$listing_sql = "select " . $select_column_list . " pse.products_id, p.products_type, p.master_categories_id, p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status = 1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status
from " . TABLE_PRODUCTS . " p, " .
TABLE_PRODUCTS_DESCRIPTION . " pd, " .
TABLE_PRODUCT_SHOES_EXTRA . " pse left join " . TABLE_SPECIALS . " s on pse.products_id = s.products_id, " .
TABLE_DEPARTMENTS . " d
where d.departments_id = '" . (int)$_GET['departments_id'] . "'
and p.products_id = pse.products_id
and p.products_status = 1
and pd.products_id = pse.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and pse.departments_id = '" . (int)$_GET['departments_id'] . "'";
}
} else {
// show the products in a given category
if (isset($_GET['filter_id']) && zen_not_null($_GET['filter_id']))
{
// We are asked to show only specific category
$listing_sql = "select " . $select_column_list . " p.products_id, p.products_type, p.master_categories_id, d.departments_id, p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status = 1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status
from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " .
TABLE_PRODUCTS_DESCRIPTION . " pd, " .
TABLE_DEPARTMENTS . " d, " .
TABLE_PRODUCTS_SHOES_EXTRA . " pse, " .
TABLE_PRODUCTS_TO_CATEGORIES . " p2c
where p.products_status = 1
and pse.departments_id = d.departments_id
and d.departments_id = '" . (int)$_GET['filter_id'] . "'
and p.products_id = p2c.products_id
and pd.products_id = p2c.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and p2c.categories_id = '" . (int)$current_category_id . "'";
} else {
// We show them all
if ($current_categories_id) {
$listing_sql = "select " . $select_column_list . " p.products_id, p.products_type, p.master_categories_id, d.departments_id, p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status = 1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status
from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " .
TABLE_PRODUCTS . " p left join " . TABLE_DEPARTMENTS . " d, " . TABLE_PRODUCT_SHOES_EXTRA . " pse on pse.departments_id = d.departments_id, " .
TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p2c.products_id = s.products_id
where p.products_status = 1
and p.products_id = p2c.products_id
and pd.products_id = p2c.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and p2c.categories_id = '" . (int)$current_category_id . "'";
} else {
$listing_sql = "select " . $select_column_list . " p.products_id, p.products_type, p.master_categories_id, d.departments_id, p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status = 1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status
from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " .
TABLE_PRODUCTS . " p left join " . TABLE_DEPARTMENTS . " d, " . TABLE_PRODUCT_SHOES_EXTRA . " pse on pse.departments_id = d.departments_id, " .
TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p2c.products_id = s.products_id
where p.products_status = 1
and p.products_id = p2c.products_id
and pd.products_id = p2c.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";
}
}
}
// set the default sort order setting from the Admin when not defined by customer
if (!isset($_GET['sort']) and PRODUCT_LISTING_DEFAULT_SORT_ORDER != '') {
$_GET['sort'] = PRODUCT_LISTING_DEFAULT_SORT_ORDER;
}
if (isset($column_list)) {
if ( (!isset($_GET['sort'])) || (!ereg('[1-8][ad]', $_GET['sort'])) || (substr($_GET['sort'], 0, 1) > sizeof($column_list)) )
{
for ($i=0, $n=sizeof($column_list); $i<$n; $i++)
{
if ($column_list[$i] == 'PRODUCT_LIST_NAME')
{
$_GET['sort'] = $i+1 . 'a';
$listing_sql .= " order by p.products_sort_order, pd.products_name";
break;
}
}
// if set to nothing use products_sort_order and PRODUCTS_LIST_NAME is off
if (PRODUCT_LISTING_DEFAULT_SORT_ORDER == '') {
$_GET['sort'] = '20a';
}
} else {
$sort_col = substr($_GET['sort'], 0 , 1);
$sort_order = substr($_GET['sort'], 1);
$listing_sql .= ' order by ';
switch ($column_list[$sort_col-1])
{
case 'PRODUCT_LIST_MODEL':
$listing_sql .= "p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
case 'PRODUCT_LIST_NAME':
$listing_sql .= "pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
break;
case 'PRODUCT_LIST_MANUFACTURER':
$listing_sql .= "m.manufacturers" . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
case 'PRODUCT_LIST_QUANTITY':
$listing_sql .= "p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
case 'PRODUCT_LIST_IMAGE':
$listing_sql .= "pd.products_name";
break;
case 'PRODUCT_LIST_WEIGHT':
$listing_sql .= "p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
case 'PRODUCT_LIST_PRICE':
// $listing_sql .= "final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
$listing_sql .= "p.products_price_sorter " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
}
}
}
// optional Product List Filter
if (PRODUCT_LIST_FILTER > 0)
{
if (isset($_GET['departments_id']))
{
$filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name
from " . TABLE_PRODUCTS . " p, " .
TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " .
TABLE_CATEGORIES . " c, " .
TABLE_CATEGORIES_DESCRIPTION . " cd, " .
TABLE_PRODUCT_SHOES_EXTRA . " pse
where p.products_status = 1
and pme.products_id = p2c.products_id
and p2c.categories_id = c.categories_id
and p2c.categories_id = cd.categories_id
and cd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and pse.departments_id = '" . (int)$_GET['departments_id'] . "'
order by cd.categories_name";
} else {
$filterlist_sql= "select distinct d.departments_id as id, d.departments_name as name
from " . TABLE_PRODUCTS . " p, " .
TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " .
TABLE_PRODUCT_SHOES_EXTRA . " pse, " .
TABLE_DEPARTMENTS . " d
where p.products_status = 1
and pse.departments_id = d.departments_id
and p.products_id = p2c.products_id
and p2c.categories_id = '" . (int)$current_category_id . "'
order by d.departments_name";
}
$getoption_set = false;
$filterlist = $db->Execute($filterlist_sql);
$do_filter_list = false;
if ($filterlist->RecordCount() > 1)
{
$do_filter_list = true;
if (isset($_GET['departments_id']))
{
//die('here');
$getoption_set = true;
$get_option_variable = 'departments_id';
$options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES));
} else {
$options = array(array('id' => '', 'text' => TEXT_ALL_DEPARTMENTS));
}
while (!$filterlist->EOF) {
$options[] = array('id' => $filterlist->fields['id'], 'text' => $filterlist->fields['name']);
$filterlist->MoveNext();
}
}
}
// Get the right image for the top-right
$image = DIR_WS_TEMPLATE_IMAGES . 'table_background_list.gif';
if ($current_category_id) {
$sql = "select categories_image from " . TABLE_CATEGORIES . "
where categories_id = '" . (int)$current_category_id . "'";
$image_name = $db->Execute($sql);
$image = $image_name->fields['categories_image'];
}
?>
Here's my tpl_departments_select.php
PHP Code:
<?php
/**
* Side Box Template
*
* @package templateSystem
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_departments_select.php 4773 2006-10-17 06:10:58Z drbyte $
*/
$content = "";
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
$content .= zen_draw_form('departments_form', zen_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get');
$content .= zen_draw_hidden_field('main_page', FILENAME_DEFAULT) . zen_hide_session_id() . zen_draw_hidden_field('typefilter', 'departments');
$content .= zen_draw_pull_down_menu('departments_id', $departments_array, (isset($_GET['departments_id']) ? $_GET['departments_id'] : ''), 'onchange="this.form.submit();" size="' . MAX_PRODUCTS_DEPARTMENTS_LIST . '" style="width: 90%; margin: auto;"');
$content .= '</form>';
$content .= '</div>';
?>
I'm thinking I must have a typo and I'm just not seeing it. There are no errors showing on the pag. I added the enable_error_logging.php, loaded, but no errors are being displayed in the cache file either.
This is running on a PHP version 5.2.5 / MySQL version 5.0.67
Apache server.
I've been going over and over this code for two days :frusty: and I cannot find my error. If someone has a moment and can take a look at my code with a fresh set of eyes, I would really appreciate it. I do believe when you stare at something too long, you can't see the forest for the trees as they say.
Ruth
-
Re: Adding New Product_types - Issue with sidebox - solved
I knew this had to be something obvious I overlooked. I totally forgot to add the configures for the drop down into the config table of the database :blush:
However Now that the boxes work I'm getting an error that based on what I've read is more a PHP5 issue with Zen's current version (queryFactoryResult error), so I'll post my questions to those forum areas.
Thanks for listening!!
Ruth
-
Re: Adding New Product_types
I have just installed the ZenCart 1.3.8a and tried to add a digital product to my new shop. Each time I try to add a new product after choosing the 'Product-digital' type, I get this error "The requested URL /admin/product_digital.php was not found on this server"
I installed ZenCart 1.3.8a through Fantastico from the cPanel of my host but could not locate the product_digital.php file
I tried downloading ZenCart 1.3.8a from the ZenCart.com and unzipped it. I still can not find the product_digital.php file.
What could be the problem?
-
Re: Adding New Product_types
Have you installed an addon? The core code doesn't have a Product-Digital.
-
Re: Adding New Product_types
Hi,
I am using Zen Cart v1.3.8a/v1.3.8 and have my site hosted by hostmylingeriesite.com
My site came preloaded with products from 4 different vendors, and now I want to add other product from different companies. I have gotten started but need to create drop down boxes.
I am going to start selling silk sheets and the company that is my supplier makes them in 33 colors as well as custom makes them in about 15 different bed sizes.
Is there a place I can get step by step instructions for accomplishing this? I browsed through a lot of other posts but did not see one specific to this.
My website is http://www.intimategoddesslingerie.com
Thank-you
2Divas
-
Re: Adding New Product_types
I've read the all thread and it was really helpful :smile:
I'm creating new product type and what changes I should make with the database? Is the adding new product type into the 'product_types' table enough? Or I need to do something with the others zen cart tables?
-
Re: Adding New Product_types
I finally found the product type documentation under previous versions. Are there any updates to this information before I start?
Basically, I need a products type for Food that has a nutritional information section, so if someone else has already made this mod, please share it with me! I'm sure I'm going to mess this up, but I need separate "description" fields for ingredients and for nutritional info. Obviously, I only need these on the food. Dog leashes don't contain many ingredients, and to the best of my knowledge they have little nutritional value. :P
Thanks again for the support. You guys are wonderful when I'm doing this :frusty:
Crystal
www.starks-ark.com
-
Re: Adding New Product_types
:bump:
Is this information still valid?
Thanks :clap:
-
Re: Adding New Product_types
-
Adding New Product_types - error 404
hello
im trying to add a new product type to zen 1.3.9a
for now i only testing admin side and dident done nothing with catalog side.
the things i have done till now :
copy admin\includes\languages\english\product_music.php to admin\includes\languages\english\product_mobile.php
copy admin\includes\modules\product_music
to admin\includes\modules\product_mobile
Code:
INSERT INTO product_types (type_name, type_handler, type_master_type, allow_add_to_cart) VALUES
("Product - Mobile Phone", "product_mobile", 1, "y");
Code:
INSERT INTO `product_type_layout` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `product_type_id`, `set_function`) VALUES
('Show Model Number', 'SHOW_PRODUCT_MOBILE_INFO_MODEL', '1', 'Display Model Number on Product Info 0= off 1= on', 6, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')), ');
when try to add new product to "product - mobile phone"
i get an error 404 Object not found! .
http://localhost/demo/admin/product_...on=new_product
can someone help me solve this ?
-
Re: Adding New Product_types
Did you make a file:
/admin/product_mobile.php
each Product Type has its own main file ...
-
Re: Adding New Product_types
@Ajeh
thank you man u the king :bigups:
-
Re: Adding New Product_types
all almost done but i have few problems in catalog side its not showing the information
in file \includes\templates\template_default\templates\tpl_product_mobile_info_display
the information will show only if i change this:
$flag_show_product_mobile_info_network == 1
to
$flag_show_product_mobile_info_network = 1
in table product_type_layout
i have the key:
('Show Mobile Network', 'SHOW_PRODUCT_MOBILE_INFO_NETWORK', '1', 'Display Mobile Network on Product Info 0= off 1= on', 6, 6, NULL, '0000-00-00 00:00:00', NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'',''text''=>''True''),array('' id''=>''0'',''text''=>''False''))')
my guess the problem is in file:
includes\modules\pages\product_mobile_info\main_template_vars
$$flag_show_product_mobile_info_network = zen_get_show_product_switch($_GET['products_id'], 'mobile_network');
where the mobile_network is it should be same as one of the define files or some other file or var or something?
can someone help me figure it up?
-
Re: Adding New Product_types
ok i answer myself
i got one extra $ in
$$flag_show_product_mobile_info_network
and yes the mobile_network is the var from :
main_template_vars_product_type
-
Product Type Info Page Layout options
when im trying to to edit the Product Type Info Page Layout options
for the mobile - product type i cant edit the options there is no dropdown box
and i get error in myDEBUG-adm
[18-May-2010 11:12:15] PHP Parse error: parse error in C:\xampp\htdocs\demo\admin\product_types.php(248) : eval()'d code on line 1
[18-May-2010 11:12:15] PHP Stack trace:
[18-May-2010 11:12:15] PHP 1. {main}() C:\xampp\htdocs\demo\admin\product_types.php:0
when trying to edit the music product type there is no error
any idea whats wrong ?
-
Re: Adding New Product_types
Unfortunately there's nowhere near enough information in these error messages to be able to debug your code.
A wild guess would be that you haven't set the standard configuration values for your product type (look at the other product types to see what they are). But that's a complete shot in the dark.
Product types can be extremely complex and there's really no substitute for stepping interactively though each stage of the code checking that appropriate values that are being generated each time.
-
Re: Product Type Info Page Layout options
Quote:
Originally Posted by
davico
when im trying to to edit the Product Type Info Page Layout options
for the mobile - product type i cant edit the options there is no dropdown box
and i get error in myDEBUG-adm
Maybe something in your sql statement not right.... for product layout you need 11 tabs.... I only see 10. I'm guessing you know that the type_id well be 6.. not sure why your using NULL for one date and '0000-00-00 00:00:00' for the other.... wouldn't NULL, NULL work or now(), now()
Quote:
('Show Mobile Network', 'SHOW_PRODUCT_MOBILE_INFO_NETWORK', '1', 'Display Mobile Network on Product Info 0= off 1= on', 6, 6, NULL, '0000-00-00 00:00:00', NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'',''text''=>''True''),array('' id''=>''0'',''text''=>''False''))')
This is how I would do it... assuming product_mobile is your product type...
Code:
SET @t4=0;
SELECT (@t4:=type_id) as t4
FROM product_types
WHERE type_handler= 'product_mobile';
INSERT INTO product_type_layout VALUES('', 'Show Mobile Network', 'SHOW_PRODUCT_MOBILE_INFO_NETWORK', '1', 'Display Mobile Network on Product Info 0= off 1= on', @t4, 6, now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False''))');
Once you clean up the sql problem, then it's just a mater of using in admin\includes\modules\product_mobile\collect_info.php
Basically, if the sql statement is correct and no errors exist in MySQL database, the switch should work without cussing errors even if it's not called for anywhere else in your code.
Product type book was a big help to me working with product type auction
-
Re: Adding New Product_types
thanks for your replay
collect_info working fine i can add update and preview products
my problem is i think in file product_types.php when getting to action=layout_edit
[SCR]http://img401.imageshack.us/img401/165/productype.jpg[/SCR]
if ill click update it will change the value to 0
-
Re: Adding New Product_types
forget about the older post i just gave up and started doing this product type again from the begging i followed up the music type-->music genre and its working perfect.
but i need it to be with multi language support for the genre name.
every time i try to do its not working
can u please tell me what are the right lines for this.
-
Re: Adding New Product_types
Sorry, but the Music Genre is not multi-lingual at this time.
-
Re: Adding New Product_types
hi guys am having trouble adding products to my categories because my categories are restricted to sub-categories .so i want to find a way of removing the product types or disabling them but at the same time i want to put sub- categories to my main categories.
thanx hear from you soon.
-
Re: Adding New Product_types
Quote:
Originally Posted by
danden
hi guys am having trouble adding products to my categories because my categories are restricted to sub-categories .so i want to find a way of removing the product types or disabling them but at the same time i want to put sub- categories to my main categories.
Sorry, but your question is very unclear. Product types are, for example: general product, document, book. Are you saying that you have categories limited to a particular product type and want to add products of a different type to them. Or are you saying that you can't add products to a category that already has subcategories?
-
Re: Adding New Product_types
when i try to add products to my categories i receive a message that tells me that i cant add products to my category because my categories are restricted to product types so i want to change my category setings and restrictions or i want to disable the product types so that i can add products to my categories....... but i dont know how do it. please help me.
-
Re: Adding New Product_types
when i try to add products to my categories i receive a message that tells me that i cant add products to my category because my categories are restricted to product types so i want to change my category setings and restrictions or i want to disable the product types so that i can add products to my categories....... but i dont know how do it. please help me.
-
Re: Adding New Product_types
when i try to add products to my categories i receive a message that tells me that i cant add products to my category because my categories are restricted to product types so i want to change my category setings and restrictions or i want to disable the product types so that i can add products to my categories....... but i dont know how do it. please help me.
-
Re: Adding New Product_types
when i try to add products to my categories i receive a message that tells me that i cant add products to my category because my categories are restricted to product types so i want to change my category setings and restrictions or i want to disable the product types so that i can add products to my categories....... but i dont know how do it. please help me.
-
Re: Adding New Product_types
all my categories are restricted to a certain product-type, But this restriction affect creation of NEW products as i can not add any new products.how can i remove or disable the product types so that i can add new products to my categories.
-
Re: Adding New Product_types
@danden
Please read this very carefully
-
Re: Adding New Product_types
I have all my items in "general". I want to have them in two categories. How can I do it? Simple solution please...
-
Re: Adding New Product_types
And there is no new category button in "Categories / Products - Top".
-
Re: Adding New Product_types
To add new product types seems to be a whole lot of work and a source for many errors. Would it not be more wisely for some one who understand how to do it to do a bunch of standard types. They can bee just named A,B, C and so on because it seems to be possible to name them to something reconcilable in the php admin interface or do I missed something?
Is it even necessary to add more product types?
-
Re: Adding New Product_types
I posted this as a new topic but didn't get any responses, perhaps this thread is a better place to ask this question:
Zen Cart: v1.3.9h
I'm adding a new product type, and have got the preview_info.php working no problem when I create a new product or edit a product via the admin Catalog->Categories/Products page.
The problem is for existing products that I have already created and I click on the "Preview" icon in the list view under the Catalog->Categories/Products page.
My preview_info.php loads, but all the defines I use for my printout are not being translated to show the correct output.
Example, in /admin/includes/languages/english/product_<my_type>.php I have:
PHP Code:
define('TEXT_DIMENSIONS_PREVIEW', 'Dimensions: %s');
This appears correctly when I get to preview_info.php when creating a new product or editing an existing one.
PHP Code:
Dimensions: 200 x 100 x 50 mm
But when I click on the "Preview" icon, it displays incorrectly:
PHP Code:
TEXT_DIMENSIONS_PREVIEW
I have tracked down this "Preview" link to /admin/includes/modules/category_product_listing.php, but can't figure out what's wrong.
It is definitely resolving to point to the correct preview_info.php that I have in /admins/includes/modules/product_<my_type>/preview_info.php, but some how, the defines php file is not getting included. :frusty:
-
Re: Adding New Product_types
A quick and easy way to reproduce the above in the demo site is described in my original thread:
http://www.zen-cart.com/forum/showth...76#post1015076
-
Re: Adding New Product_types
Hi I have been trying to add new product type but have failed.
i have tried instructions from 3 different sources and still cant manage to get any reaction.
- http://www.zen-cart.com/forum/showthread.php?t=43663
- http://smallbusinessconsultingexpert...duct_types.php
- http://blog.kineticpulse.co.uk/2010/...-zen-cart.html
Why i say i have failed is because i cant see them as input when i select new product type and create new product under that product type.
what is it im doing wrong if i dont see it in the create new product page ?(action=new_product)
or rather what is the basic step to get it appear there first.
-
Re: Adding New Product_types
Help: I was in Catalog-then Product types-then I edited Product-general and try to put it back to the way it was-but....I think I messed up where you put the product handler information. I thought it was product_general and the last part I clicked This product should be considered a sub-type of (then I put Product-General). When I try to add my very first product after I made a category for it, I get 404 admin error-but if I choose product-music, document general etc. it will let me add a product.
So I guess, I need what to put in the product handler spot and what should I choose from the drop down in the the sub-caterory box.
I CANNOT add one product until I fix this :(
-
Re: Adding New Product_types
Quote:
Originally Posted by OwlHollow
then I edited Product-general
Maybe you did not restore it correctly
Get a fresh replacement from a new distribution
-
Re: Adding New Product_types
Quote:
Originally Posted by
OwlHollow
Help: I was in Catalog-then Product types-then I edited Product-general and try to put it back to the way it was-but....I think I messed up where you put the product handler information. I thought it was product_general and the last part I clicked This product should be considered a sub-type of (then I put Product-General). When I try to add my very first product after I made a category for it, I get 404 admin error-but if I choose product-music, document general etc. it will let me add a product.
So I guess, I need what to put in the product handler spot and what should I choose from the drop down in the the sub-caterory box.
I CANNOT add one product until I fix this :(
The correct "handler" for Product-General is "product".
-
Re: Adding New Product_types
THANK YOU-Here is a big HUG!! I have sat here idle since yesterday afternoon-and here it took one minute for a kind person to help me-thank you so much!!
-
Re: Adding New Product_types
Hey guys, i don't know how active this thread still is, but i couldn't find anyone else with a similar issue. I'm trying to add a new product type for DVD's, but it just doesn't show anything when i try to actually create a product in the catalog with that type! It shows up as a choice down where it says product type, but then when i create new, it shows this:
Parse error: syntax error, unexpected '[' in /*/*/*/*/product_dvd.php on line 11
I have made its own directory in the admin/includes/modules as a handler, and made the handler file to call it, and then i added a language file for it - i mostly copied from the music format since i wanted to add extra fields like studio and genre. then i made the catalog template files. i really don't know what i've missed, i've been pouring over the handler file for days, but i can't figure out what's wrong! it seems to match the exact format as the product_music file, and the languages file seems fine too! UGH! does anyone know what i might be missing?
-
Re: Adding New Product_types
Quote:
Originally Posted by WutsAnEmu
does anyone know what i might be missing
Tutorial on products types
http://www.zen-cart.com/content.php?...rammer-view%29
-
Re: Adding New Product_types
WutsAnEmu, you can try using product.php as the base for product_dvd.php. I can't remember why, but I chose product.php to base all my new product types instead of product_music.php.
-
Re: Adding New Product_types
Quote:
Originally Posted by
kobra
thanks, i already read this, i was just wondering if anyone might be able to catch what i'm doing wrong. i've tried again. the zen cart just keeps coming up with :
WARNING: An Error occurred, please refresh the page and try again.
:shocking: siiiiiiigh.
-
Re: Adding New Product_types
Quote:
Originally Posted by
WutsAnEmu
thanks, i already read this, i was just wondering if anyone might be able to catch what i'm doing wrong. i've tried again. the zen cart just keeps coming up with :
WARNING: An Error occurred, please refresh the page and try again.
:shocking: siiiiiiigh.
And when you see this warning, that means there should be a Zen Cart error log.. what does IT say.. this error is a generic message that tells us next to nothing without the error log which will contain some details as to what the issue is..
-
Re: Adding New Product_types
Quote:
Originally Posted by
WutsAnEmu
WARNING: An Error occurred, please refresh the page and try again.
I just copy-and-pasted that error message into the FAQ search and came up with this article by the same name which tells you the next steps to take, namely seeing the actual database error message that caused it: http://www.zen-cart.com/content.php?...-and-try-again
-
Re: Adding New Product_types
Quote:
Parse error: syntax error, unexpected '[' in /*/*/*/*/product_dvd.php on line 11
That tells you what file and line number to look at. What does that file contain around line 11?
-
Re: Adding New Product_types
Thanks guys, I got it working. I think i just missed some entries that needed to be changed to _dvd instead of music, and some pages i didn't notice i would need.
Quote:
Originally Posted by
gjh42
That tells you what file and line number to look at. What does that file contain around line 11?
The file at line 11 didn't contain anything wrong, it was the weirdest thing. I think it was just getting stuck over itself. anyway, i've worked it out! thanks all!
-
Re: Adding New Product_types
It could have been something that is fine in normal processing, but gives unexpected results when a file it depends on is missing.
-
Re: Adding New Product_types
When i
I add a new category I go into new category enter the information up load the image and create a description the save it but it does nor register in my category list.
Richard
-
Re: Adding New Product_types
Hi.
When I first set up our store I somehow managed to delete most of the product types, I have no memory of how or why I did this. I now need to add a new product based on Document-General. Can anyone suggest the easiest and safest way to do this?
Thanks.
-
Re: Adding New Product_types
Michael, when do you think I will be able to get into my store?
-
Re: Adding New Product_types
Michael, my version is 1.5.5
I DON'T KNOW FROM VERSION
i UPGRADES FROM A NOICE TO UPGRADE
i DID NOT SET UP ZEN ZART MY WED DESIGNER DID AND SHE IS NO AVAILABE. THE ONLY THING IS TO UPDATE PROODUCT IN MY WESITE, NO PAYMENT IS SET UP I HAVE Q=SQUSRE FOR MY PAYMENT SOURSE SHIPPING ,MODUALS ARE FEDEX
SET UP FOR ENGLOSH
MY WEB PERSON SET UP ZEN CART
i HAD ZEN SINCE 2004 THE PROBLEM STARTED ABOUT 4 WEEKS AGO. NOTHING HAS CHANGED
HOW DO YOU POST CONTENT OF REATED "DEBUG LOGS
BLANK PAGE #1 IS BLANK WITH HTTP ERROR 500, PAGE TWO IS A PRICE PAGE BUT IT'S ANLY A PARTIAL PAGE
THIS IS MY FIRST STORE i DON'T WHAT YOU MEAN TESTED ALL ASPECTSOF TRANSACTIONS?
i NOT SURE OF MY SITE CUSROMIZED OR DIFFERENT
URL DOGGIELOUNGERS.COM
HOSTING COMPANY WEBLINE SERVICES ( I TALED TO THEM AND THEY SAID I NI INFFORMATION ABOUT ZEN CART IF YOU NEED A PHONE NUMBER 620 244 4557
SORRY, I DON'T KNOW HOW TO SEARCHABLE DOC
YOU ARE THE ONLY ONE WHO RESPONDID TO THE PROBLEM
-
Re: Adding New Product_types
There is no michael in this thread. You were posting in another thread and somehow wound up here.
You will need to find someone you trust to get into your site through it's control panel. No telling what system Webline Services uses for your site. They offer cPanel but I am willing to bet it is very watered down.
They are listed as a New York company with a Kansas phone number owned by someone in Passaic NJ. And, the Kansas phone number is listed as a landline versus mobile.
:shocking:
-
Re: Adding New Product_types
@dbltoe doggie means me....sigh, but doggie seems to keeps posting in a couple of random threads hoping that I happen to find what they posted instead of staying in the PM system and sending me the login information I require to take a look to my email address as requested... so you can see the problem I am having with this