The product-type that I'm having trouble saving is Music. It appears that product type General saves the field data correctly. There must be something I have to edit, but I don't know where to start. Thanks.
Its the update product file that saves it to the database. If I remember correctly, the music type has its OWN update product file. I think its contained in the music folder. While the example in this mod only shows how to do it for the product types which I think is 3 of them. So you will have to compare the update file for product and use it for the music update file.
This is what I assume is happening as you most likely did not edit the separate file. Please have a backup of your site and database before doing this. I recommend having a test site so your live store is not affected during your merges.
Thanks for the suggestions!
It appears that the Music product update file already has the NPF changes added. Any other ideas?
For the update file, I assume you did the merges yourself? You cannot take the update file in the mod and place it in the music folder. The music folder has its own unique update file.
Also, once you get that update file resolved, and IF you wanted to show these new fields on the product listing, you will have to change the install sqls to reference the music product type. You will want to change it from '1' to '2'. '2' being the music product type id for music products.
I found the answer to my problem. The file admin/includes/modules/product_music/collect_info.php was altered during the installation of the plugin. But one piece was missing:
about Line 67:
Should be:Code:p.products_discount_type, p.products_discount_type_from, p.products_price_sorter, p.master_categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCT_MUSIC_EXTRA . " pe
This segment was copied from admin/includes/modules/product/collect_info.php.Code:p.products_discount_type, p.products_discount_type_from, p.products_price_sorter, p.master_categories_id" . $npf_fields . " from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCT_MUSIC_EXTRA . " pe
What was really happening was that the field changes were being captured in the database, but were not being displayed back to the product editing page.
Last edited by chain_man; 20 Apr 2014 at 06:10 AM.
I have started another thread when I could not find this. The links to it is http://www.zen-cart.com/showthread.p...98#post1258298
Sorry for the side link
Learning Fast.
Eden Craft Supplies
Sorry wrong link http://www.zen-cart.com/showthread.p...11#post1258311
Learning Fast.
Eden Craft Supplies
I wanted to install Numinix Shipping Boxes Manager and so I tried installing Numinix Product Fields as the first step.
Using ZC 1.5.1, Product Fields 2.0, PHP 5.2.17
I was at step 4 and tried to add the Dimensions field.
I get "WARNING: An Error occurred, please refresh the page and try again."
This is in the log file:
[26-Sep-2014 17:12:47 America/Chicago] PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALTER TABLE zc_products ADD products_dim_type ENUM('in','cm') NOT NULL default '' at line 3 :: #MODIFY THE DEFAULT ACCORDINGLY FOR THE NEXT 2 ROWS
ALTER TABLE zc_products ADD products_weight_type ENUM('lbs','kgs') NOT NULL default 'lbs' after products_weight;
ALTER TABLE zc_products ADD products_dim_type ENUM('in','cm') NOT NULL default 'in' after products_weight_type;
ALTER TABLE zc_products ADD products_length DECIMAL(6,2) NULL default NULL after products_dim_type;
ALTER TABLE zc_products ADD products_width DECIMAL(6,2) NULL default NULL after products_length;
ALTER TABLE zc_products ADD products_height DECIMAL(6,2) NULL default NULL after products_width;
ALTER TABLE zc_products ADD products_ready_to_ship ENUM('0','1') NOT NULL default '1' after products_height;
ALTER TABLE zc_products ADD products_actual_weight varchar(32) NULL default NULL after products_weight;
ALTER TABLE zc_products ADD products_diameter varchar(32) NULL default NULL;
INSERT INTO zc_product_type_layout (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, product_type_id, sort_order, last_modified, date_added, use_function, set_function) VALUES
(NULL, 'Show Dimensions', 'SHOW_PRODUCT_INFO_DIMENSIONS', '0', 'Show product dimensions on product info page (requires Numinix Product Fields)?', 1, 17, NULL, NOW(), NULL, 'zen_cfg_select_option(array(\'1\', \'0\'),'),
(NULL, 'Show Diameter', 'SHOW_PRODUCT_INFO_DIAMETER', '0', 'Show product diameter on product info page (requires Numinix Product Fields)?', 1, 17, NULL, NOW(), NULL, 'zen_cfg_select_option(array(\'1\', \'0\'),'),
(NULL, 'Show Conversions', 'SHOW_PRODUCT_INFO_CONVERSIONS', '0', 'Show weight and dimension conversions on product info page (requires Numinix Product Fields)?', 1, 17, NULL, NOW(), NULL, 'zen_cfg_select_option(array(\'1\', \'0\'),'),
(NULL, 'Show Smaller Units', 'SHOW_PRODUCT_INFO_SMALLER_UNITS', '0', 'Show weight and dimensions as g/oz? (requires Numinix Product Fields)?', 1, 17, NULL, NOW(), NULL, 'zen_cfg_select_option(array(\'1\', \'0\'),'),
(NULL, 'Show Actual Weight', 'SHOW_PRODUCT_INFO_ACTUAL_WEIGHT', '0', 'Show zc_products actual weight on product info page (requires Numinix Product Fields)?', 1, 17, NULL, NOW(), NULL, 'zen_cfg_select_option(array(\'1\', \'0\'),'); in /home/bandera/public_html/zc/includes/classes/db/mysql/query_factory.php on line 120
I'm not sure what I'm missing in the installation. When I look at the database, it looks like the changes have been made. I can see the fields that were added.
Bookmarks