chcomm Posted June 22, 2009 Share Posted June 22, 2009 I need some directions regarding the addition of fields in Products Table and easy populate contribution. My catalogue has about 200 to 300 products needing to by updated 2, 3 times a week. I use easy populate to update my products from an Excel sheet. I receive an XML feed for my Excel sheet with specific fields for each product. Each product has to have 4 different and unique fields in addition to product_name. I added 4 fields in the products table of my database, : products_color, products_weight, products_width, products_height. I modified easypopulate.php as follow: $custom_fields[TABLE_PRODUCTS] = array( 'products_color' => 'color', 'products_weight' => 'weight', 'products_width' => 'width', 'products_height' => 'height'); The extra fields are in the easy populate admin panel. I am able to import and export products from my excel sheet using EP. So far everything seems OK. I am not and expert and can really not find the whole list of files I need to change in order to add these new fields. I obviously need to see them in my catalogue and if possible in my admin product list. I hope it all makes some sense and somebody can help. Thank you. Quote Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted June 22, 2009 Share Posted June 22, 2009 You will need to edit /admin/categories.php to add maintenance of these new fields. product_info.php to display them to the customers. Quote Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>. Link to comment Share on other sites More sharing options...
chcomm Posted June 24, 2009 Author Share Posted June 24, 2009 You will need to edit /admin/categories.php to add maintenance of these new fields. product_info.php to display them to the customers. Thanks Geoffrey for your quick reply. I have been testing what I could in product.php. This solution is working for me so far : <?php } else { $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description_color, pd.products_description_size, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query); tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } if (tep_not_null($product_info['products_model'])) { $products_name = $product_info['products_name'] . $products_description_color = $product_info['products_description_color'] . $products_description_size = $product_info['products_description_size'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>'; } else { $products_name = $product_info['products_name']; } ?> Unfortunately, everything is attached to my product name in one line, no space. I really do not know and can not find the syntax in order to create a space between each field. Also, I can not find the location of the code for the box which present all the products listed in one category . (Let's See What We Have Here box) I need my new fields to appear next to the product name there as well. Thanks again and I hope you can help again all the way from the almost center of the universe. Christian. Quote Link to comment Share on other sites More sharing options...
chcomm Posted June 25, 2009 Author Share Posted June 25, 2009 Any help still welcome on the last 2 points. Thanks Quote Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted June 26, 2009 Share Posted June 26, 2009 Looks like your EP import is not putting the 4 extra columns into the 4 new fields. I'd sort that out before working on displaying info. To see what is in easch field in the db use phpmyadmin. Quote Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.