Jump to content

Importing combinations, setting default product


rbmn67

Recommended Posts

Hi there,

 

Wondering if someone can help me out. So far I managed to get everything perfectly working, except for setting the default combination with a CSV combinations import.

 

Import runs fine and adds combinations to the products. Although I filled out the column "Default (0=No, 1=Yes)" it seems the import sets the first imported combination for a product as the default combination, not respecting the column "Default" setting (alas, not permitted to upload).

 

So, I changed the sorting order of the records, which is a practical work-around but the drop-down list for the combinations gets messed up (e.g. 50, 250, 500 dropdown becomes 250 (default), 50, 500).

 

I tried to find out in the AdminImportController.php where in the public function attributeImport() where and how the (int)$info['default_on'] variable is written, but my php skills are far from sufficient.

 

Anyone? Please?

 

With kind regards,

Ruud. 

 

 

Link to comment
Share on other sites

Hi Richard,

 

Thx for your response, The sort worked out fine, an alphabetical sort of numerical field, nonetheless, it sorted fine (attached sorted and unsorted).

 

My problem is, if you look at Product Id 18, which has three 'combinations', uploading 'unsorted results in a default combination of 50 ml, and a drop down list of resp. 50, 250 and 1000 ml.

 

The sorted list results in the proper default combination (250 ml), with a drop down list of resp. 250, 50 and 1000 ml.

 

Best result would be if the "Default" = 1 would set the default combination for the product.....

 

Thanks for the idea though,

Ruud.

 

 

 

 

Combinations-Sorted.csv.zip

Combinations.csv.zip

Link to comment
Share on other sites

  • 9 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...