1. xpozay
  2. RO CSVI
  3. Wednesday, 20 April 2016
  4.  Subscribe via email
I just purchased your pro product and am starting to play with it a little. I have created some templates, added fields, looked at the options, etc. and can see an option to filter the export report based on payment methods. But I do not see how I can do the same for shipment methods. Is this possible?

Specifically I have physical products that I am selling. The customer can buy online and chose to ship via courier or self collect from one of our retail outlets. Therefore, to support this, we currently generate a daily shipping report using Inter**** Report (like stock picking) for each retail outlet (and main HQ for packing couriers). How can I achieve the similar?

Thanks in advance for your assistance

Chris

Edited:
Some additional notes. I found these topics
- https://www.csvimproved.com/forum?view=topic&catid=24&id=30632
- https://www.csvimproved.com/support/questions-and-answers/858-override-import-export-routines
which gave me ideas
- I found administrator/components/com_csvi/addon/com_virtuemart/model/export/orderadvanced.php & it looks like there is the provision for selecting the shipping method (pls correct me as I am not a coder but can read a little script)
- In my template, I have used order advance and export. I have added a number of fields including virtuemart_shipmentmethod_id which I can see under the fields tab
- I do not see an option under templates/option tab for shipment method yet I do see for payment method
_ also if I click on the "edit templates fields" button from the template/fields tab, I can see virtuemart_shipmentmethod_id and when I edit this, there is no rule

Is there something else that needs to happen?
Accepted Answer Pending Moderation
Hello,
We dont have shipment filter for order export currently but we have added this feature to our todo list for our next release. We will send you the patch once it is ready and so you can use it.
Kind regards,

Tharuna

=========================
If you use CSVI, 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
Thank you for your quick response.

Is this an easy hack that we could make temporarily? We are upgrading our server to J3, V3 (and we had hoped CVS Improved) in the next couple of weeks (most likely before end April) if all goes well.

I don't mind being a guinea pig and do have a developer that can help to ensure the hack gets implemented correctly if you can point us to the code that does the selection for payment method and where in the code it would make the filter.

Again thanks for your assistance.

Chris
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello Chris,
Please load the attached patch file for virtuemart order shipment filter and try doing the export. Let me know how it goes.


patch_vm_order_export_shipment_2016-04-20.zip
Attachments (1)
Kind regards,

Tharuna

=========================
If you use CSVI, 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
Thanks.

I used the VM "Order" operation for my testing.

What worked:
- Produced a list of orders included the "shipping name" (not really see below) (I don't see how you linked to the shipping_en_GB table as it is not in the SQL query - maybe coded?)
- Could select the shipping name from the list under options

What did not work
- The report did not filter
- The SQL Query did not include a Where clause for the shipping name select. This may be because the next line
- I noticed that the selected shipping method was saved (under options) when I re-edited the template however, "Do Not Include" was added back automatically. Therefore there was my chosen shipping name + Do Not Include. Perhaps this affected the SQL Query? Whereas when I edited the Payment Methods option the Do Not Include option did not come back.
- The produced report displayed the shipping_desc and not the shipping_name.

Chris
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello Chris,
Can you post the debug log of the export? That will help me to find what and why things didnot work.
Kind regards,

Tharuna

=========================
If you use CSVI, 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
As requested, pls find attached a copy of the log. I have also included in the file an image file which highlights what I meant by the "Don't Use" option stays selected even though I delete it.

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

What worked:
- Produced a list of orders included the "shipping name" (not really see below) (I don't see how you linked to the shipping_en_GB table as it is not in the SQL query - maybe coded?)

Yes the code has been set to take the default language and so the right tables can be used.

- Could select the shipping name from the list under options

Glad that it worked.

What did not work
- The report did not filter

Your debug log says that you didnot set any shipment filter and so report did not filter.
- The SQL Query did not include a Where clause for the shipping name select. This may be because the next line
- I noticed that the selected shipping method was saved (under options) when I re-edited the template however, "Do Not Include" was added back automatically. Therefore there was my chosen shipping name + Do Not Include. Perhaps this affected the SQL Query? Whereas when I edited the Payment Methods option the Do Not Include option did not come back.

You need to remove this Don't use option. I see that you have that set with the shipment filter and so records didnot filter. Try removing Don't use option and export again.
- The produced report displayed the shipping_desc and not the shipping_name.

This cannot be possible as your debug log says that you have added shipment_name field and not shipment_desc.
Kind regards,

Tharuna

=========================
If you use CSVI, 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
Understand. This is what I was saying. I did remove the "Don't Use" option. Saved and "when I re-edited the template however, 'Don't Include' was added back automatically". I tried saving a few times with the same result. I tried making changes to other fields eg. payment method and this saved as expected.

If I go to the back end (database) and edit the settings field of the specific template from "ordershipment":["","6"] to "ordershipment":["6"], then it filters as expected. Thus to my original point that the option is not saving the selection properly.

Note: If I change the value in the database, then edit from the admin backend interface (ie normal interface), the Don't Use option does not return. If I remove all other values, save and re-edit Don't Use returns (as expected). But if I then add shipment methods and remove Don't Use, then when saving it comes back ie back to the original problem.

Note: I tried on both FF and Chrome to see if there was a difference and none. Saving with both browsers, the save put "Don't Use" back in.
  1. more than a month ago
  2. RO CSVI
  3. # 8
Accepted Answer Pending Moderation
Hello Chris,
Honestly saying i am not seeing this issue here. Can you send me your export template? You can backup your template from Maintenance tab and select CSVI Pro on first option and backup templates on the second. i will install it here and see if i can see the issue.
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 9
Accepted Answer Pending Moderation
Sure attached. It is not confidential, just dummy data for now.

I had a quick peek and can see there are two options there for shipment method. I tried saving with 1,2,3 different shipment methods and it made no different. The option for "Don't Use" is always there, even if deleted, as can be seen in the XML file.

Note: For 'fun', I saved with the Don't Use choice and a real shipping method selected and the XML file has three choices. Two blank plus my number 6. This is xml file #2.
Attachments (2)
  1. more than a month ago
  2. RO CSVI
  3. # 10
Accepted Answer Pending Moderation
Hello Chris,
Sorry to say but even with your template i am not seeing the issue. Can you send me your site administrator login details? I will check on your site directly and even can take a look at the other shipment_name issue too.
Kind regards,

Tharuna

=========================
If you use CSVI, 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
We have identified the problem - it is a cross between code & data. Both are correct and both are incorrect.

The query in the model for csvivirtuemartordershipment.php is different than that of csvivirtuemartorderpayment.php which is partly why I could not replicate the problem with that field:

  • orderpayment method selection takes the values from the payments table where as ordershipment method selection takes the values from the orders themselves and joins with the shippingmethods_en_GB to arrive at the method_name

  • [color=#0044ff]if there are orders (virtuemart_orders) where the shippingmethod_id is not in shippingmethods_en_GB[ then a blank / space option (Don't Use) is written to the csvi_template.setting along with any selected successfully shippingmethods[/color]



Why a data issue?
- because there should be shippingmethods that correspond with those shippingmethod_ids written to virtuemart_orders

Why not data (ie code)?
- it is not illogical that a shippingmethod could be removed. virtuemart allows it and thus it could easily happen
- even if there are orders without corresponding shippingmethods, a blank value should not be written as the user has deselected that option

My two cents
Assuming that the code remains as is, what is the logic of the joins? Ie why not just return the list of shippingmethods from the shippingmethods_en_GB table since, if there are virtuemart_orders records that do not have a corresponding shippingmethod, the query returns a blank and those specific orders would not get written to the report (I assume) - I have not tested this part but it is logical since there is no corresponding shippingmethod to select.
  1. more than a month ago
  2. RO CSVI
  3. # 12
Accepted Answer Pending Moderation
Hello,

Thank you for your analysis.

The logic behind the join is that it only makes sense to filter on shipment methods that have actually been used. The removal of shipment methods for which orders still exist is not something that has come to mind.

Your analysis makes sense concerning the blank, this is something we will fix. Once we have a patch ready, it will be posted so that you don't have to wait for the next release.
  1. more than a month ago
  2. RO CSVI
  3. # 13
Accepted Answer Pending Moderation
Hello Chris,
Thank you for reporting this issue. Please load the attached patch file and see if it solves the issue.


patch_vm_order_export_shipment_2016-04-22.zip
Attachments (1)
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 14
Accepted Answer Pending Moderation
Yes thanks, this fixes the ability to save without Don't Use.

Thanks very much for your quick response.
  1. more than a month ago
  2. RO CSVI
  3. # 15
Accepted Answer Pending Moderation
Hello Chris,
Glad to know it worked good and solved the issue :)
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 16
  • Page :
  • 1


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