Jump to content

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

Product Features In Api - Not Updatable? Rate Topic   - - - - -

 
  • lil_eddie
  • Member
  • Members
  • Join Date: 20-Nov 11
  • 25 posts

Posted 19 April 2016 - 08:27 PM #1

Hi all,

 

I am trying to automate Features on a large catalogue by using the API.

 

For example, my client has 30 different 'Materials' for their products. I am looking for key words in the product description, for example I see the word 'Wood' I then want to update the Feature called 'Material' to 'Wood'

 

The features are already defined Multiple select lists (checkbox).

 

I am pulling the product out via the API, updating the Feature for the Material with the new feature_id but it does not update. Other data such as amount/price/name all work fine, it seems a PUT on product_features does not do anything.

 

Am I missing something?

 

This is my product_features BEFORE:

[product_features] => stdClass Object
(
	[29] => stdClass Object
		(
			[feature_id] => 29
			[value] => 
			[value_int] => 
			[variant_id] => 8414
			[feature_type] => M
			[description] => Material
			[prefix] => 
			[suffix] => 
			[variant] => Glass
			[parent_id] => 0
			[features_hash] => 14-8414
			[variants] => stdClass Object
				(
					[8414] => stdClass Object
						(
							[value] => 
							[value_int] => 
							[variant_id] => 8414
							[variant] => Glass
							[image_pairs] => 
						)

				)

		)

)

This is what I return over the API:

[product_features] => stdClass Object
(
	[29] => stdClass Object
		(
			[feature_id] => 29
			[value] => 
			[value_int] => 
			[variant_id] => 8412
			[feature_type] => M
			[description] => Material
			[prefix] => 
			[suffix] => 
			[variant] => Wood
			[parent_id] => 0
			[features_hash] => 
			[variants] => //not filling this in but even if i do it does nothing.

		)

)

But it does not save the changes.

 

Any ideas please?

 

Thanks


Pixel Hero

E-Commerce, Web Design, Landing Pages, Web Development and Hosting.

CS-Cart and Concrete5 specialists. @pixel_hero


 
  • lil_eddie
  • Member
  • Members
  • Join Date: 20-Nov 11
  • 25 posts

Posted 19 April 2016 - 08:54 PM #2

Prehaps the best way is to build a CSV of data and use the Import process? What data is 'REQUIRED' in order to set a new M type Feature?


Pixel Hero

E-Commerce, Web Design, Landing Pages, Web Development and Hosting.

CS-Cart and Concrete5 specialists. @pixel_hero