1. xpozay
  2. RO CSVI
  3. Thursday, 21 April 2016
  4.  Subscribe via email
I started a new thread from the previous to avoid confusion. Pls let me know if you prefer to the combined thread
https://www.csvimproved.com/forum?view=topic&catid=44&id=33119
for different issues ....

I believe I have found why in my report I am seeing the shipment_desc and not the shipment_name - actually it is both shipment_name concatenated with shipment_desc

Please correct me where my assumptions are in correct

Background:
- shipment_name field selected in the template fields
- Component = virtuemart & operation = order
- shipment_name + shipment_desc is output

When looking at the log file
- template field shipment_name is selected (in fact shipment_desc is not an option in the Quick Add Fields)
- In the SQL Select statement shipment_name is not included but instead "virtuemart_shipmentmethods`.`shipment_element`"
- shipment_element, in my particular case is weight_countries
- in shipment_plg_weight_countries`, each order is stored with the field "shipment_name"
- this shipment_name field contains the concatenated values of fields shipment_name + shipment_desc from shipping_methods_en_GB however the field text here is HTML and not plain text (because of this I have doubts over my logic above)

Assuming the above is correct and that is the intended output (ie will not be changed), what would I need to do to just get shipping_name from the shippingmethods_en_GB table. I recognise that there is safety by taking the data from "shipment_plg_weight_countries" ie in case the shipping methods change or get deleted. However, in my case I just need the shipping name.
Accepted Answer Pending Moderation
Hello,

One thread per issue is preferred, it keeps us a little sane :)

The VirtueMart order export only exports the shipment_name, not the description.

(in fact shipment_desc is not an option in the Quick Add Fields)
Correct, the shipment description is only available in the shipping rates import and export.

In the SQL Select statement shipment_name is not included but instead "virtuemart_shipmentmethods`.`shipment_element`"
Have a look at the code and you will see why that is needed. The shipment_name is not stored in the order table but in a related table.

shipment_element, in my particular case is weight_countries
That is good because it is the only supported shipping plugin.

this shipment_name field contains the concatenated values of fields shipment_name + shipment_desc
That is because VirtueMart stores this info in the shipment_name field in the shipment_plg_weight_countries table for the order.

Assuming the above is correct and that is the intended output (ie will not be changed), what would I need to do to just get shipping_name from the shippingmethods_en_GB table.
You will need to create your own code to take the name from the shipmentmethods_en_gb instead of the weight_countries table. The other option would be to strip all the unwanted text by using the replacement rule.
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
Thanks for your reply. So this is where I assume I can override your code rather than hack it.

I am not a coder but I can read it and make sense of what is going on - sometimes if easy enough I can hack a bit too :)

Assuming that I can override can you tell me which file I need to override. Is it the addon\com_virtuemart\models\export\order.php?

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

So this is where I assume I can override your code rather than hack it.
Yes you can although that part hasn't been released yet, we do have a patch available to implement this functionality. See the thread here regarding this subject. The path in your case will be "/administrator/templates/isis/html/com_csvi/com_virtuemart/model/export/order.php".

Is it the addon\com_virtuemart\models\export\order.php?
Correct.
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. # 3
  • Page :
  • 1


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