charliec Posted September 28, 2010 Share Posted September 28, 2010 Hi I want to add a field, $location when I import product data using csv file.I added this field to AdminImport.php on $this->available_fields = array(...............'location'=>$this->l('Location') ..........)'location'=>array('AdminImport','createMultiLangField'),$id_product_attribute = $product->addProductAttribute(floatval($info['price']), floatval($info['weight']), floatval($info['ecotax']), intval($info['quantity']), null, strval($info['reference']), strval($info['supplier_reference']), strval($info['ean13']), intval($info['default_on']),strval($info['location']));I changed addProductAttribute from product.php topublic function addProductAttribute($price, $weight, $ecotax, $quantity, $id_images, $reference, $supplier_reference, $ean13, $default, $location)I see $location field when I import csv and the product successfully gets uploaded except that $location field is not working when I view the product at the shop.Can anyone help me with adding $location field to product data import? Link to comment Share on other sites More sharing options...
charliec Posted September 28, 2010 Author Share Posted September 28, 2010 Oops never mind, fixed on my own. Easy fix but didn't see it.Just in case you need info, all you have to do is$product->location = strval($info['location']); Link to comment Share on other sites More sharing options...
Oncilla Posted September 28, 2010 Share Posted September 28, 2010 I would like to add two custom fields to my products also. Could someone break the above posts down into dot points? Like a step by step tutorial on what to edit etc? I'm not too familiar with PHP.Thanks! Link to comment Share on other sites More sharing options...
massalexx Posted November 5, 2010 Share Posted November 5, 2010 HiCould you help me create a custom csv-field called "Affiliate link" and the srcipt should convert these URL:s to links e.g converting http://ad.cj.com/ppc/?1654 to Go to the shop! The link redirects the visitor to the supliers product page.thxAlex Link to comment Share on other sites More sharing options...
Stefand Posted November 17, 2010 Share Posted November 17, 2010 How can I display and import the location field ??And which code I can add to adminimport.php ? Link to comment Share on other sites More sharing options...
Recommended Posts