Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

fn_update_product_option Rate Topic   - - - - -

 
  • teksigns
  • Senior Member
  • Members
  • Join Date: 26-Jun 09
  • 181 posts

Posted 01 November 2009 - 04:08 PM #1

I have a script that updates my products and adds new products as my supplier
updates there feeds ....

I have one supplier that has jewelry .....

they have rings with different sizes .....

i was thinking of using the

fn_update_product_option


can anyone shed any lite on how i would add all the available ring sizes
from my script using the fn_update_product_option

this is the way i add products in the script .
( note this is not all the code its just so you have a idea
what im doing .. ) im adding perfectly fine ... works great ....
I just want to be able to add product options ....


              // Adding product record
$product_id = find_product($data[0]);
$product_data = array(
'product_id' => $product_id,
'main_category' => $category_id,
'product_code' => $data[0],
'short_description' => '',
'product' => $data[1] . ' ' . $data[9],
'full_description' => $data[3],
'price' => get_wholesale_price($data[11]), //11 - wholesale price
'list_price' => $data[10], //10 - retail price
'amount' => $data[17] == 'Y' ? 1 : 0,
'weight' => $data[15],
'shipping_freight' => $data[13],
'supplier_id' => '17', //wholesale
'status' => 'A',
'tracking' => 'D',
'timestamp' => date('m/d/Y'),
'product_features' => array(
'9' => ($data[22] == 'N' ? '24' : '25'),
'14' => $data[18]
)
);

$myproduct = $data[1] . ' ' . $data[9];

$product_id = fn_update_product($product_data, $product_id);



some rings will have only certain sizes available
so i want to be able to add only the available ring sizes.

also the ability to update the ring sizes for that product later ...
when i run he update again ... any ideas on solving this ?

thanks for your help .....