1. aquaseal
  2. RO CSVI
  3. Thursday, 25 October 2018
  4.  Subscribe via email
Hello,

@ Joomla 3.8.10 + VM 3.2.12 + OPC 2.0.367 + CSVI Pro 7.9.0

I'd like to notice that unfortunately the [product_attribute] field doesn't work properly in advanced order export. It will export the default values of the custom fields. For example if you have a simple S type custom field dropdown with different product colors, you will get in the order export the default value and not the user choosen value.
I checked the database table and it contains the right custom values for the order item..

Could you pls fix this?
thanks
Accepted Answer Pending Moderation
Hello,

We will have a look at this and get back to you. Thank you for letting us know.
Kind regards,

RolandD

=========================
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
Hello,

So I am looking further into this. Now I created a product and linked a custom field of the type S as a dropdown and added 3 values. The values are good, bad and ugly. I do see the dropdown in the product and selected the bad value. On the frontpage I do see the bad value as well and I ordered the product. After placing the order I no longer see which option was selected nor do I see it stored by VirtueMart.

This makes me wonder how you have setup your product. Can you give me more details on how you have setup the simple product?

Edit:
I had forgotten to set the attribute as Cart attribute. After doing that the value is stored in the database but there is something else. I ordered the product with condition bad as said earlier. Now I change the value in the product to ugly and the order shows that I ordered the ugly. That is something serious wrong with VirtueMart. This shouldn't change after I ordered the product.
Kind regards,

RolandD

=========================
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. # 2
Accepted Answer Pending Moderation
Hello RolandD,

Thanks for checking this. I don't understand I use this function of VM since long time and it works for me. This is how I do:
One should make under VM / products / custom field a new custom field, type "string". "Cart attribute" and "Cart input" should be both checked.
Afterwards : edit the product - go to custom field tab - choose under "type of customfield" the name of your newly made field and add values: overprice and values (good, bad, ugly)
That's all.
The customfields are stored @ $product->customfields[]
Important data here:
->virtuemart_product_id
->virtuemart_custom_id
>virtuemart_customfield_id
As you put the product into the cart the data of custom fields will be sent through a hidden field like this:
input name=customProductData[virtuemart_product_id][virtuemart_custom_id] value = [virtuemart_customfield_id]
or
input name=customProductData[virtuemart_product_id][virtuemart_custom_id][virtuemart_customfield_id] value="choosen value"
These data will be stored after order in _virtuemart_order_items table in product_attribute field like this:
example1: simple dropdown custom fields: gold / red / black:
{ "5": "15"}
Here 5 is virtuemart_custom_id (name: color) and 15 is virtuemart_customfield_id (value: black)

example2: S type custom field "WIDTH", with predefined values from 10 to 500. You can choose the value from dropdown, default value is "100".
{
"22": {
"327": "200"
}
}
where 22 = virtuemart_custom_id & 327 = virtuemart_customfield_id and 200 is the choosen value, 200.

CSVI adv order export gets "WIDTH 100", as if the data retrieved from order_item table would be overwritten with default values as it checks what 22 and 327 mean..
BTW if you use language overrides in field name, like COM_VM_WIDTH, it won't be translated to width.
  1. more than a month ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
Hello,

Thank you for the elaborate explanation. As you guessed, I missed checking the cart input, once I did that I got the correct value in the database. Now I am able to see your issue as well. As you have pointed out, the way the data is stored is different for every type of custom field and plugin. There is no quick fix I dare to offer without understanding what is going to break.

So we are going to check against all the possible ways VirtueMart stores values in the product_attribute table and come up with a proper fix.

If you are OK with changing your own files for now, you can make the following change. In the file plugins/csviaddon/virtuemart/com_virtuemart/model/export/orderadvanced.php after line 1124 add

if (is_string($value))
{
$values[] = $value;
continue;
}


CSVI doesn't load language files, you can make a replacement rule and link it to the field and the replacement of the value will be done on export.
Kind regards,

RolandD

=========================
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. # 4
Accepted Answer Pending Moderation
Hello,

Thanks for the code. It solves the problem in case of type 2 (values are showed, labels not) but type 1 remains empty.

BTW filtering on shipping method doesn't work because the code is missing. But it can be copied from simple order export to here.
  1. more than a month ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
Hello,
Thanks for the code. It solves the problem in case of type 2 (values are showed, labels not) but type 1 remains empty.

The code checks if the custom field value stored is a string and exports it. So if the value stored is a string it would have worked and not for other case. We are looking into this issue and will get back to you with a patch file.

BTW filtering on shipping method doesn't work because the code is missing. But it can be copied from simple order export to here.

Thank you for letting us know. We will include the missing code in our next release.
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. # 6
Accepted Answer Pending Moderation
Hello,

It looks like I have a similar problem as mentioned above ...

I use the latest version of Virtuemart + Custom Filters PRO + Custom Fields for All

I have exported the *.csv file where I need to get the value of the ordered size in the [product_attribute] field. However, there is only the output from the Custom Filters PRO / Custom Fields For All be found in the table - see the exported content of the [product_attribute] field below

{
"8": {
"3122": {
"customsforall_option": "4247"
}
}
}

Is there a quick solution how can i get a specific size of ordered goods?

Many thanks in advance, Ivo
  1. more than a month ago
  2. RO CSVI
  3. # 7
Accepted Answer Pending Moderation
Hello,
We are aware of the issue with product_attribute field and it is in our todo list. Will send you the patch file once the fix is ready.
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. # 8
Accepted Answer Pending Moderation
Thank you for the quick reply. When could the patch file be available?
  1. more than a month ago
  2. RO CSVI
  3. # 9
Accepted Answer Pending Moderation
Hello,
We do not have an ETA as of now but we are sure that this issue will be going into our next release and so the patch file will be ready soon. I will keep you updated.
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. # 10
Accepted Answer Pending Moderation
Hello All,
The patch file for product_attribute field fix is ready and has been attached with the message. Please load the patch file and check product_attribute field on export. We have added support for most of the custom fields types in VirtueMart, if there is anything missing with the patch file, do let us know.

patch_vm_2018_11_19.zip
Attachments (1)
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. # 11
Accepted Answer Pending Moderation
Hello Tharuna,

Thank you for the quick preparation of the fix

I have tested it, but in my case it still does not work properly - after export I only get the name but the value of the custom field is not exported

as I mentioned above, see my example bellow

{
"8": {
“3122”: {
"customsforall_option": “4247”
}
}
}

where {8} = virtuemart_custom_id from the virtuemart_customs table - this value is exported

{3122} = customfield_id and {22145} = id from the product_custom_plg_customsforall table - there is the customsforall_value_id field there which contains the value associated with the specific size that I need to get in product_attribute

Please check it out again

Many thanks, Ivo
  1. more than a month ago
  2. RO CSVI
  3. # 12
Accepted Answer Pending Moderation
Hello Ivo,
I have tested it, but in my case it still does not work properly - after export I only get the name but the value of the custom field is not exported

Can you post your export file so to see the values on your export?

{
"8": {
“3122”: {
"customsforall_option": “4247”
}
}
}

where {8} = virtuemart_custom_id from the virtuemart_customs table - this value is exported

{3122} = customfield_id and {22145} = id from the product_custom_plg_customsforall table - there is the customsforall_value_id field there which contains the value associated with the specific size that I need to get in product_attribute

You are right about "{22145} = id from the product_custom_plg_customsforall table - there is the customsforall_value_id field". The value of this customsforall_value_id is stored in #__virtuemart_custom_plg_customsforall_values table and that is where patch code is getting the values for product_attribute field on export. Do you have a value stored in this table for customsforall_value_id 22145?
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. # 13
Accepted Answer Pending Moderation
Hello,

I have attached these previews:

*.csv - you can see the current export (without customer data), some items are duplicated (I do not know why)

The entry from the last order in the database looks like this:

1.jpg - field from _virtuemart_order_items table
2.jpg - row from _virtuemart_product_custom_plg_customsforall table
3.jpg - row from _virtuemart_custom_plg_customsforall_values

From my point of view the entries in the database should be all right...

Thanks, Ivo
Attachments (4)
  1. more than a month ago
  2. RO CSVI
  3. # 14
Accepted Answer Pending Moderation
Hello Ivo,
Thank you so much for the screenshots, that really helped. The confusion was that both id and customsforall_value_id fields had same value in #__virtuemart_product_custom_plg_customsforall table in my database records and so the query with customsforall_value_id worked for me. But VirtueMart is storing the id value and not customsforall_value_id in database for product_attribute field. I have corrected this with the patch file attached. Can you please load the modified patch file and run the export?

*.csv - you can see the current export (without customer data), some items are duplicated (I do not know why)

Take a look at Group by and Sort by document to avoid duplicates on your export.

patch_vm_2018_11_20.zip
Attachments (1)
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. # 15
Accepted Answer Pending Moderation
Hello Tharuna,
Great, now it works right and thank you for the link...
Cheers, Ivo
  1. more than a month ago
  2. RO CSVI
  3. # 16
Accepted Answer Pending Moderation
Hello Tharuna,

I have one more bold question - is there any easy solution/fix for the old version on your side? Joomla 2.5.28 + VM 2.6.22 + CF Pro 2.2.7 + CSVI Pro 5.21.2
I need to export same data from the old site backup, but I came across the same issue with product_attribute...

Thanks, Ivo
  1. more than a month ago
  2. RO CSVI
  3. # 17
Accepted Answer Pending Moderation
Hello Ivo,
Sorry to say but we have stopped supporting older versions of Joomla and CSVI.
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. # 18
Accepted Answer Pending Moderation
Hello Tharuna,
Of course I understand, but I have had to try it... ;)

Regards,
Ivo
  1. more than a month ago
  2. RO CSVI
  3. # 19
  • Page :
  • 1


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