1. james
  2. RO CSVI
  3. Tuesday, 11 June 2019
  4.  Subscribe via email
Hello,

When using the virtuemart order export I am getting duplicates of some lines. This happens when a customer has entered a shipping address and a billing address that are different. It also duplicates others several times over (4 of 1 item).

I have tried using the product SKU field to group by but then you only get 1 item and any further items are left out.

To be clear, this is nothing to do with child products as these are not children.

I have seen this topic but no answer has been offered.

Thanks for any help,

James
Accepted Answer Pending Moderation
Hello James,
What if you group by virtuemart_order_item_id field? Do you see all the items of an order then?
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
Hi,

I have tried to filter by the field mentioned but still get duplicates. I have attached a screenshot of the order and the resulting file. I have also added a shot of the fields in the template in case I am missing something.

Kind regards,

James
Attachments (4)
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello James,
Can you try group by field virtuemart_order_id? You field setup looks fine to me.
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
This only shows one item of the order so still no good.

Is there a way to avoid the duplicates or will I need to format after the file is exported or look to use SQL to get it directly from the DB rather than through the component?

Regards,

James
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello James,

The output file you posted earlier actually has no duplicates ;) Let me explain. Line 2, 4 and 3,5 belong together because those are the billing and shipping entries, so they differ on that field. If you compare line 2 and 4, you will see they differ based on their product SKU, the same goes for line 3 and 5. This means there are actually no duplicates. Can you follow me?

How would you like the exported file to look like? If I know that we can see if we can fine-tune the query with the available options.

or look to use SQL to get it directly from the DB rather than through the component
It will be the same thing as CSVI is using an SQL query as well. The way you are fine-tuning the query now is with a graphical interface rater than directly in the database. The output you see now would be the same if you did it directly at the database.
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. # 5
Accepted Answer Pending Moderation
Hello,

Thanks a lot for the help. I see, I missed that.

I have attached another file that is even more confusing as it seems to output 4 of a an item when the order only has one - I can see how it is doubled as they entered 2 addresses but why 4 of the anchor products?

I was hoping I could find a way to only show a certain address (shipment) - using the rules and then only 1 result per item. I have tried setting up a rule but not sure how it works. So if there is a shipment address I want that if not we would use the billing address, but I do not want duplicates of each item.

I have attached a first attempt at the rule -which does not work - but it may give you an idea of what I want/need.

Regards,

James
Attachments (2)
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
Hello James,

So if there is a shipment address I want that if not we would use the billing address, but I do not want duplicates of each item.
That is actually an option in the template called Order address type on the Options tab. Click the Help button and it will explain you the options. You don't need a rule for this.

but why 4 of the anchor products?
That is impossible to tell from the file, it should be a field that is not in the import file.

Let us know how it goes.
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. # 7
Accepted Answer Pending Moderation
Hello,

So the issue with the duplicates is related to SKU existing twice in the backend. This was an unpublished item so it’s deleted and the duplicates have gone.

The only issue I have with this is that I will have duplicate SKUs due to languages at some point. If I can’t filter them out then I’ll have to look at it downstream and maybe have separate SKUs in my stock system that this file will be uploaded too.

The address selection seems to work - I have chosen Billing or Shipping and it displays shipping address where possible then lines with billing of not. I’m assuming that address_1 and 2 are made up of other fields as they seem to be populated with either shipping or billing - which is the desired result. If that’s true then it’s all good.

Thanks for the help and I hope to hear back from you soon.

Regards,

James
  1. more than a month ago
  2. RO CSVI
  3. # 8
Accepted Answer Pending Moderation
Hello James,

So the issue with the duplicates is related to SKU existing twice in the backend.
These are things we cannot know :) Although SKUs should be unique per product otherwise you never know which product you want as the SKU is inconclusive.

The only issue I have with this is that I will have duplicate SKUs due to languages at some point.
It shouldn't be though. You can add different languages to a single product in VM. So let's say SKU ABC can have it's descriptions in the languages of your choice. Depending on the language the user has selected on the site, VM will show the matching description for that language.

If you must have duplicate SKUs, the only solution would be to group by on more fields to make the distinction. This would need some trial and error to see which fields you need to add to the group by to get the result you need.

The address selection is good, that is exactly what this option was designed to do. So you are good there.
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. # 9
  • Page :
  • 1


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