Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help! Easy Poplulate & Quantity Controller Problem


jesse9201

Recommended Posts

Posted

Hello,

 

I'm using the Feb 2003 snapshot, Easy Populate 2.4 and Linda's Quantity Controller 5.1. I have a store with 4,000 items so I thought the above contributions would be ideal for easy upload.

 

I'm getting the following error after trying to add Quantity Controller fields to Easy Populate:

File uploaded. 

Temporary filename: /tmp/php2gbD5B

User filename: Sat_2_22.txt

Size: 1090

DateAvail was ----DateAdded was --2003-02-18 19:27:58-- | 29239 | 29239.jpg | Fimo Bead | Fimo beade | | | | | 1.99 | 3.9900 | 1.70 | 24 | 1.00 | | 2003-02-18 | 600 | 12 | 1 | | Ladies | Costume Je | Jewelry | Active Updated

DateAvail was ----DateAdded was ---- | 33080 | 33080.jpg | Scented Ca | Displaying | | | | | 6.3 | 9.9500 | 5.60 | 12 | 1.00 | | | 1200 | 3 | | | Giftware | Home | | Active !New Product!



1064 - You have an error in your SQL syntax near '", "1", CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMES' at line 19



INSERT INTO products ( products_image, products_model, products_price, products_price_list, products_status, products_last_modified, products_date_added, products_date_available, products_tax_class_id, products_weight, products_quantity, products_quantity_order_min, products_quantity_order_units, products_discount1, products_discount1_qty, manufacturers_id) VALUES ( "33080.jpg", "33080", "6.3", 9.9500", "1", CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, "", "1.00", "1200", 3", ", 5.60", 12", NULL)

 

This is how I modified Easy Populate:

//   insert into products



	 $sql = "SELECT MAX( products_id) max FROM products";

	 $result = tep_db_query($sql);

	 $row =  tep_db_fetch_array($result);

	 $max_product_id = $row['max']+1;

	 if (!is_numeric($max_product_id) ){

   $max_product_id=1;

	 }

	 $v_products_id = $max_product_id;

	 echo "<font color='green'> !New Product!</font><br>";

	 $query = 'INSERT INTO products (

  	 products_image,

  	 products_model,

  	 products_price,

  	 products_price_list,

  	 products_status,

  	 products_last_modified,

  	 products_date_added,

  	 products_date_available,

  	 products_tax_class_id,

  	 products_weight,

  	 products_quantity,

  	 products_quantity_order_min,

  	 products_quantity_order_units,

  	 products_discount1,

  	 products_discount1_qty,

  	 manufacturers_id)

     VALUES (

    	 "' . $v_products_image . '", "'

    	 . $v_products_model . '", "'

    	 . $v_products_price . '", '

    	 . $v_products_price_list . '", '

    	 . $v_db_status . ',

    	 CURRENT_TIMESTAMP,

    	 ' . $v_date_added . ',

    	 ' . $v_date_avail . ',

    	 "' . $v_tax_class_id . '", "'

    	 . $v_products_weight . '", "'

    	 . $v_products_quantity .'", '

    	 . $v_products_quantity_order_min .'", '

    	 . $v_products_quantity_order_units .'", '

    	 . $v_products_discount1 .'", '

    	 . $v_products_discount1_qty .'", '

    	 . $v_manufacturer_id.')';

   $result = tep_db_query($query);

 } else {

 

Could someone please help me intergrate Quantity Controller into Easy Populate? Thanks in advance.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...