1. raydekker
  2. RO CSVI
  3. Thursday, 04 August 2016
  4.  Subscribe via email
Good day,

I can import all my custom fields (strings with the "S" option) no worries, works perfect.
As described in the tutorial to create a "Stockable Custom Field" you have to manually add a new custom field, select the "Plugins" option, then select stockable custom fields, click save and that way the parameters at the bottom show up to add the custom fields you want in there...

Is there a way to automate this?
I've tried adding the "Stockable Custom Field" as a plugin (by using the "E" option), this works but it does not populate the parameters (custom_params) field at the bottom (where it adds the custom fields). I assume if this was possible you would be describing this in the tutorial but I think it would be really awesome when this is importable instead of manually adding this field in between your imports (so after importing all the fields now you have to manually create the stockable custom field).

Even if I can maybe add a specific row directly into my tables via mysql? I haven't tried this yet but this could be an alternative maybe?

Thanks, best regards, Ray
Accepted Answer Pending Moderation
Hello Ray,
You need to do Custom field import to import your custom fields first and then do product import. This way custom fields are created before and used during product import. The custom_params field in custom field import will have the ids of custom fields you want to add for Stockable custom fields. You can have a look at the database table #__virtuemart_customs and see how the fields are stored in there.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
The problem I had before, the reason why it didn't work earlier is that I forgot to put in the "custom_element" field which seems to be mandatory :)
Then another problem I had is that the field id's vary and change all the time but I found the following workaround:

If you delete the Custom Fields via the VM backend (I checked the database after deleting the groups and "virtuemart_customs" is empty) and add them again (new import via CSVI) they get new id's, as you said already the "auto-increment".
So this is no good...

But...
If I empty (trunkate) the database table "virtuemart_customs" manually, the groups are empty in the backend (obviously) BUT when I import my groups again via CSVI they get ID's starting from 1 again in the same order as I import them (so row 1 gets id1, row 2 id2 etc...).

This is great as now I can get excel to find the required custom field and assign the designated id! :D

As you described these id's are part of the "custom_params" field used for the import.

Thanks heaps! Tested and problem solved!
Best regards, Ray
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello Ray,
Glad to know that your issues are all solved :)

It would be a great if you can post a review for CSVI on JED :)
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
It would be a great if you can post a review for CSVI on JED :)

Done! B)

You guys know this already I assume but I found out why trunkating the tables work for me regarding keeping the same group and custom filter id's...
So trunkating the tables resets the auto-increment value which makes the import start with assigning id's from 1 again :)
Whereas just deleting data doesn't reset this auto-increment value and in that case importing gives you new id's which are a pain to import ;)

Cheers
  1. more than a month ago
  2. RO CSVI
  3. # 4
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!