1. raydekker
  2. RO CSVI
  3. Tuesday, 02 August 2016
  4.  Subscribe via email
G'day,
I'm trying to import my Product Builder steps.
After importing my VM products and categories and PB products, groups and tags I have to set the steps again in the menu manager.
So let's say PB custom product 1 has got 10 groups devided over 4 tabs (steps), product 1-3 is step 1, 4-6 is step 2 etc...
Now I have to click on the add steps again after emptying database and importing which makes sense as the groups disappear for a little while.

I've done an export of all the available items in Joomla Menu's, please find the attached file.
I've only added steps to the first 2 PB Custom products (line 10 and 11 in the excel file), column P tells me something about the steps but there are 6 steps assigned in this case but I can't find how to easily add them.
It looks like there are maybe group id's setup in there (column Q till AP) but that's of no use as these change all the time obviously.

I would like to add a step after let's say PB group "Memory" and another step after PB group "Extra Storage 3" and so on...

I hope this is possible, I believe it is but I haven't been able to figure out how to do so yet ;)

The test site for a reference (note that not eveything is fully functional here):
http://www.btechsolutions.com.au/test/pcbuilder-btsvalue
http://www.btechsolutions.com.au/test/pcbuilder-btsbasic

Thanks in advance!
Best regards, Ray
Accepted Answer Pending Moderation
Hello Ray,
The details you are saying refers to params field of a menu. This params field is purely based on the individual component and CSVI can only import the field as a whole and as in the import file. As you already said the steps in params field is storing the group ids of the display on frontend. The only way i see here is that you can try adding the group ids of the steps you want to show/add on frontend in param field and import the param field. The value of params field as a whole will look like the below.

{"disp_image":"1","resize_img":"0","img_width":"200","img_height":"","img_ar_width":"100","img_ar_height":"100","compatibility":"0","disp_price":"1","disp_pb_prod_descr":"1","disp_pb_prod_img":"0","bundle_img_height":"90","disp_gr_header":"1","prod_display":"0","disp_quantity":"1","disp_full_image":"1","steps":"prd_32,1369,1370,1371,s1371,1372,1373,1374,1375,1376,s1376,1377,s1377,1378,1379,1380,1381,1382,s1382,1383,1384,1385,s1385,1386,1387,1388,1389","step0":"Basics","step1":"Drives","step2":"Graphics","step3":"Case & Cooling","step4":"Software","step5":"Extras","step6":"","step7":"","step8":"","steps_indicator":"1","steps_links":"1","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","menu_text":1,"menu_show":1,"page_title":"PC-Builder - BTS Value | BTech Solutions","show_page_heading":"","page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}
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
Ah ok,

Yes so basically I just want to import the params field but there's only one problem which is that it needs group id's (which change all the time) and not group names.
This means after an import I just have to add the steps manually to the menu items and click save...
Ideally I would like the group names to be compared to the group names in the database, then extract that group id and use that instead so I can get my script to do this automatically but I do totally see that this would require a lot of programming ;)
Maybe in a possible future update... :)

Or maybe we can add just the option of where to add a step, for example after the 3rd id, 4th id, 7th id and so on, that way it can still be automated. So that it adds the "s"+id in between the number of step that is put in? Like a seperate PB menu item plugin?
But again, I do see that this will take a lot of programming but that would make it ideal ;)

For now I can do this manually, my automated script just imports and updates and in case of a database clean (empty) I will have to add the steps again.

Thanks, Ray
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello Ray,
Yes so basically I just want to import the params field but there's only one problem which is that it needs group id's (which change all the time) and not group names.

That is how Product Builder is storing and reading the steps in the form of group ids.

This means after an import I just have to add the steps manually to the menu items and click save...

Yes, the other option i see is adding the group ids to params field and importing it.

Ideally I would like the group names to be compared to the group names in the database, then extract that group id and use that instead so I can get my script to do this automatically but I do totally see that this would require a lot of programming ;)
Maybe in a possible future update... :)

Yes, agree to this. It needs programming help to automate this process.

For now I can do this manually, my automated script just imports and updates and in case of a database clean (empty) I will have to add the steps again.

Ok, the other option as i said already is params field import.
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
Yes, the other option i see is adding the group ids to params field and importing it.

Another thought I have to make this work, as the way I understand it is that the group id's always change (add-up) when I delete the groups and import them again, can I assign static group id's to the groups while importing??
That way I can do as you suggest and use the param field for the menu steps import but if not then these always change and I don't know how to program this to work...

Or even if it means "trunkating" the groups table and importing directly into my database via mysql would work maybe? As long as the id's stay the same...

Best regards, Ray
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello Ray,
Another thought I have to make this work, as the way I understand it is that the group id's always change (add-up) when I delete the groups and import them again, can I assign static group id's to the groups while importing??
That way I can do as you suggest and use the param field for the menu steps import but if not then these always change and I don't know how to program this to work...

Or even if it means "trunkating" the groups table and importing directly into my database via mysql would work maybe? As long as the id's stay the same...

The group id is a primary key field of a Product Builder database table, it is also an auto increment field and we don't have any control over it. So i don't think it is not to have static group ids.
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. # 5
Accepted Answer Pending Moderation
Yes, we did it!
I found the following workaround working for me:

If you delete the Groups via the PB backend (I checked the database after deleting the groups and "pb_groups" 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 tables "pb_groups", "pb_group_vm_cat_xref" & "pb_group_vm_prod_xref" 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 group name 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! I've tested the group import and this works in the frontend perfectly I just have to test import the menu steps but the "custom_params" field should do this trick :)

Best regards, Ray
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
Hello Ray,
Glad to know that your issues are all solved.
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. # 7
  • Page :
  • 1


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