It would be good if anyone knew a way of putting quantity discounts on collect info page...
I have got it to display 10 by choice but posting it back is prooving difficult
Printable View
It would be good if anyone knew a way of putting quantity discounts on collect info page...
I have got it to display 10 by choice but posting it back is prooving difficult
Thanks so much for this - I figured this is why it wasn't showing but no one else bothered to stop over many different threads and give specific instructions and I was too lazy to try it myself!
One note however, replace the 1201 with '' and the field will automatically choose the next id number like this:
('', 'Show My Field', 'PRODUCT_LIST_MYFIELD', '1', 'MYFIELD', 8, 13, NULL, '2006-07-05 13:59:40', NULL, NULL);
The 4th field that has the number 1 in it will sort the display - leaving a 1 there makes the display sort by the number and then alphabetically but you can resort in the admin to get the display to work.
Hello everyone,
I don't know if anyone has referenced this page throughout this epic thread, but I thought that this webpage describing how to add new fields to products might be of use to someone somewhere sometime...
http://www.cornerpiecewebdesign.co.u...product-fields
The author referenced this particular thread as his starting point. I've followed his instructions carefully, and whilst it's not a quick method, it definitely works.
I hope it helps someone.
please help, I am trying to add new properties via a new DB table. The second post or so suggests doing it this way but I haven't found anyone posting on how to actually doing it this way. I don't want to mess anything up in the process and would greatly appreciate any response on how to do do. I am relatively new to PHP but learn quickly. Setting up the DB table is no problem at all but getting zen and Easy populate to link to it properly is where the problem lies. I have ideas of how to do it but again I want to get it right.
I am trying to add a couple of properties to the music product style. I have followed the instructions as specified at the beginning of this post but I made the changes to the files in /admin/includes/modules/update_products and /admin/includes/modules/products_music/collect_info and preview info . The two new properties appear on the product_info.php page.
THe database is updated each time I hit the update button but the database does not record what I enter for the new properties added.
I am not sure what I am doing wrong.
Should the code/ logic be any different for the music style verses product-general?
ANy ideas what would prevent the database from updating. TIA TOM :cool:
Ok...... I found a couple of typos and correct them.
Now I am receiving this error when I enter regular product.
1054 Unknown column 'products_sitchguide' in 'field list'
in:
[update products set products_quantity = '1', products_type = '1', products_model = 'SB', products_price = '34.0000', products_date_available = null, products_weight = '1', products_status = '1', products_virtual = '0', products_tax_class_id = '1', manufacturers_id = '1', products_quantity_order_min = '1', products_quantity_order_units = '1', products_priced_by_attribute = '0', product_is_free = '0', product_is_call = '0', products_quantity_mixed = '1', product_is_always_free_shipping = '0', products_qty_box_status = '1', products_quantity_order_max = '0', products_sort_order = '0', products_discount_type = '0', products_discount_type_from = '0', products_price_sorter = '34.0000', products_sitchguide = '', products_embellishment = '', products_image = 'categories/cat_symphony_bulky.png', products_last_modified = now(), master_categories_id = '26' where products_id = '168']
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
It appears that the two fields I entered....... products_embellishment = '', products_embellishment = '' are not recognized.
When I do an insert of a music product, the two new fields are not recognized.
Since the fields I entered are NOT NULL, I receive and nothing is entered into those fields, there is an error message that the fields are blank
Any ideas on how I should progress. TIA TOM
Hello
First of all, I haven't read the whole thread since it is too long... So please excuse me if someone else has already commented this issue. Some time ago i applied the hack to add extra fields to the products. Everything was working fine... But yesterday a client warned me that these extra fields' contents were not getting copied when duplicating products in admin.
For those who want their extra fields to get duplicated, I share my solution (sorry, no line numbers, my code is too edited):
- Open file "admin/includes/modules/copy_to_confirm.php". Make a backup copy.
- If your new fields are in the "zen_products" table, find the select statement that saysetc. and add there your new fields names. Then find the statement that goesCode:$product = $db->Execute("select products_type, products_quantity, products_model, products_image,
etc. and edit it to include your new fields values (in the fields names list as well as in the values list).Code:$db->Execute("insert into " . TABLE_PRODUCTS . "
- If your new fields are inside the zen_products_description table, follow the same procedure, but editing, instead of the previous blocks of code, those beginning withand withCode:$description = $db->Execute("select language_id, products_name, products_description,
.Code:$db->Execute("insert into " . TABLE_PRODUCTS_DESCRIPTION . "
Save, upload and that's it, your new fields will be duplicated when you duplicate a product.
As a side matter, I also noticed that products meta tags don't get duplicated either when duplicating a product. To solve this, you can addsomeplace afterCode:$metas = $db->Execute("select language_id, metatags_title, metatags_keywords,
metatags_description
from " . TABLE_META_TAGS_PRODUCTS_DESCRIPTION . "
where products_id = '" . (int)$products_id . "'");
while (!$metas->EOF) {
$db->Execute("insert into " . TABLE_META_TAGS_PRODUCTS_DESCRIPTION . "
(products_id, language_id, metatags_title, metatags_keywords,
metatags_description)
values ('" . (int)$dup_products_id . "',
'" . (int)$metas->fields['language_id'] . "',
'" . zen_db_input($metas->fields['metatags_title']) . "',
'" . zen_db_input($metas->fields['metatags_keywords']) . "',
'" . zen_db_input($metas->fields['metatags_description']) . "'
)");
$metas->MoveNext();
}
I hope this helps some people.Code:$description->MoveNext();
}
Oh, and sorry for my bad English (and the lack of line numbers).
Yako
Hi
I created some additional product fields using product_weight as the staring point ... and it all worked very well. However, I have upgraded to 1.3.9h and now the additional fields (measurements, materials, maintenance etc) will only show up if I have something in the product_weight fields. Has anyone got any idea of how this has happened - or, more importantly, how I get it to show something in any of the fields if they are filled in but leave the individual field (and title) blank if there is no data in that field.
Alos, I cannot get these fields to update via the Admin. The only way to update these fields is by filling in the fields directly into the database. This is not so good if I am checking for errors and spot a typo etc and just want to quickly change it.
Many many thanks, from very snowy Scotland
If you mean on the Catalog ... check your template for the Product _info and see if it is because you added your new product info in the IF statement:
as this is setup to only show this section based 1 or more fields existing ... if your new data is inside that IF, but not one of the data components being tested, then it is turned off ...Code:<!--bof Product details list -->
<?php if ( (($flag_show_product_info_model == 1 and $products_model != '') or ($flag_show_product_info_weight == 1 and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name))) ) { ?>
Hi
Thanks a million. That is great - I managed to fix that problem.
Now, the next prolem I have is this... I have added 3 fields all based on the product_weight which are Measurements, Materials and Technical Details. The additional fields are fine if I populate them through the database but if I try to add something in the Admin > Catalogue > Product section, it doesn't seem to write it to the database for one of the fields (Technical - products_technical) but all the other new fields work. Which file do i need to look at? Is it the update product file?
In the update_product file I have the following code:
$sql_data_array = array('products_quantity' => $products_quantity,
'products_type' => zen_db_prepare_input($_GET['product_type']),
'products_model' => zen_db_prepare_input($_POST['products_model']),
'products_price' => $products_price,
'products_date_available' => $products_date_available,
'products_weight' => zen_db_prepare_input($_POST['products_weight']),
'products_measurements' => zen_db_prepare_input($_POST['products_measurements']),
'products_materials' => zen_db_prepare_input($_POST['products_materials']),
'products_technical' => zen_db_prepare_input($_POST['products_technical']),
'products_maintenance' => zen_db_prepare_input($_POST['products_maintenance']),
The extra fields I have created all update from the Admin product Info page, except for "technical" which just returns to blank after I press update. Any ideas why that might be?
Many many thanks
Gillian