1. thagh05t
  2. RO CSVI
  3. Thursday, 02 March 2017
  4.  Subscribe via email
Hello All,

I have just purchased and integrated CSVI reluctantly, but I have to say it will really make life easier in the future as I get more creative with it. So, congratulations on a great product! That being said, lets get down and dirty with it...

I have the latest Joomla! and CSVI installed as well as the latest stable release of Hikashop Business with multiple paid add-on's for HikaShop.

I have setup a HikaShop orders export to a separate table in the database but have a few issues so far that I would really like to get worked out:

PRIORITY #1 (for me) - I am logging the export template and see it run, but I do not see any rows being processed when triggered from the "After Created" mass-action; however running the export from the CSVI component back end does populate the table as expected. I really want the template to be triggered when HikaShop receives an APN from PayPal updating the order to Confirmed.

PRIORITY #2 (for me) - When exporting orders from HikaShop there is a field zone_name_english, which is the human readable name of the country the user lives in and is what I can use with USPS API, but I have found no way to get the friendly name for the user's state in the HikaShop orders export???

PRIORITY #3 (for me) - Although I can beautifully export orders from HikaShop to a table albeit a few kinks, if the user has ordered multiple items it does not show up in the export. I imagine this could be done by iterating over the items in the order and joining that data to the right of the table if it exists. This is important to me because I have to declare each item on the customs forms and I currently have an ODBC connection between stamps.com software and my site. If This was an option for me I could auto map customs declarations which would cut my label printing time in half.

PRIORITY #4 (for me) - I think the last major thing for me is that when exporting HikaShop orders to another table there are sometimes field separator values in the data. For example, international users will often comma separate their street address adding sub regions or communities of a particular city they live in (similar to counties for those of us in the states, although we don't add it to our addresses). This has caused a lot of issues with my imports thus far, and I would really like to find a way to overcome this obstacle. Right now I have a cron job setup to run a replace query, which is a bit of a dirty way to do things as more moving parts makes this harder to manage.

I am sure I will have a few other things to look into in the near future and have some I am working out now, but these are the big ones for me that I would really, really, really like to resolve ASAP. Thanks again for such a great and versatile tool as well as your future support!
Accepted Answer Pending Moderation
Hello,

Glad to hear you got the basics up and running. Just not to get confused let's deal with one problem at a time. Your first issue is the Mass Action trigger. My question would be, have you setup the workflow as a described in the Export order after an order is created tutorial?

The HikaShop CSVI Export plugin is what should be triggered by HikaShop which in turn triggers CSVI.
  1. more than a month ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
I should have been more specific, but yes I have followed the tutorial and set it up the exact same way. When an order is created on the site the mass-action will trigger the HikaShop CSVI Export plugin which will attempt to export from the specified template. The template log does show it was triggered, but no records were processed. I have turned off all filtering from the options tab in the template, the secret keys match up, and the cron option is set to yes. While we are on the subject, I setup multiple templates to do an export from HikaShop for a testing table and a prod table, but the HikaShop CSVI Export plugin drop-down only sees one template. Is this normal?
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello,

The template log does show it was triggered, but no records were processed.
Is the log from the template you want to use with the Export plugin? Please post the log also for us to see.

I setup multiple templates to do an export from HikaShop for a testing table and a prod table, but the HikaShop CSVI Export plugin drop-down only sees one template. Is this normal?
That is normal if only 1 template has the option Enable front-end/cron set to Yes. Only templates with that setting to Yes will be shown.
  1. more than a month ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
Sorry for the absence, I will be answering much quicker from here on out. I have attached 3 logs, from what I can tell the only thing that happens is a cleanup of old log files on the date the trigger is called from the mass-action.



You were right that I did not have the template enabled for front-end/cron. That being said, can I not have multiple templates enabled for HikaShop export? I imagine I could make changes to the plugin and install as a secondary or tertiary etc. if needed, but is this the only way so far? If I am going to modify the export plugin I may as well ad support for multiple exports from the same plugin at that point eh?

Getting back on track, lemme know if the logs mean anything significant to you, but I couldn't find anything particularly useful for my situation. Also, can I set this up to trigger only when an order has been set to confirmed by the payment plugin for HikaShop instead of when an order is first created? Or even better, when an order is changed to confirmed both manually and when an APN is received.
Attachments (3)
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
I was trying to search available fields for hikashop just now at https://csvimproved.com/support/visual-available-fields/hikashop and got a page that says :

HIKASHOP

A graphical overview of the HikaShop available fields
There are no articles in this category. If subcategories display on this page, they may contain articles.

And am not able to see any fields anymore. Can you please make this page refresh filters when the page is reloaded?
  1. more than a month ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
I was just looking through the code for the HikaShop export plugin and noticed that it appears as though I can only trigger exports when an order is created. Any way to modify this to trigger as requested above?
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
Hello,
You were right that I did not have the template enabled for front-end/cron. That being said, can I not have multiple templates enabled for HikaShop export? I imagine I could make changes to the plugin and install as a secondary or tertiary etc. if needed, but is this the only way so far? If I am going to modify the export plugin I may as well ad support for multiple exports from the same plugin at that point eh?

Right now there is support for triggering only one template which is set in CSVI HikaShop export plugin. Yes, the only way i see is that you can try to modify the plugin and see if you can support multiple templates.

Getting back on track, lemme know if the logs mean anything significant to you, but I couldn't find anything particularly useful for my situation. Also, can I set this up to trigger only when an order has been set to confirmed by the payment plugin for HikaShop instead of when an order is first created? Or even better, when an order is changed to confirmed both manually and when an APN is received.

The CSVI HikaShop order export plugin uses event which is triggered only when order is created. You can code your own plugin and trigger the HikaShop order events as explained in HikaShop documentation.

I was trying to search available fields for hikashop just now at http://csvimproved.com/support/visual-available-fields/hikashop and got a page that says :

HIKASHOP

A graphical overview of the HikaShop available fields
There are no articles in this category. If subcategories display on this page, they may contain articles.

And am not able to see any fields anymore. Can you please make this page refresh filters when the page is reloaded?

Yes, you're right. The title filter don't seem to be cleared on page load.

I was just looking through the code for the HikaShop export plugin and noticed that it appears as though I can only trigger exports when an order is created. Any way to modify this to trigger as requested above?

Please check the HikaShop documentation linked above.
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
Hello,
I missed to mention about your issue of no records processed. One of your debug log shows that you have set order_id filter to 2249 along with last run and status to be confirmed and other debug log have last run and status to confirmed filters set. I am guessing that there are no orders which are confirmed from the last run time. Can you please check your orders on the same?
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. # 8
Accepted Answer Pending Moderation
I do have orders that are confirmed that should have been exported. Although the order ID filter is not set on the backend. I may have set it for testing at some point, but it is not set now and should be exporting orders when triggered.
  1. more than a month ago
  2. RO CSVI
  3. # 9
Accepted Answer Pending Moderation
I also just checked my db to be sure maybe a setting wasn't hung there forcing it to use order_id.

"category_separator":"\/",
"splitorderline":"0",
"ordernostart":"",
"ordernoend":"",
"orderlist":"",
"orderdaterange":"lastrun",
"orderdatestart":"",
"orderdateend":"",
"ordermdatestart":"",
"ordermdateend":"",
"orderstatus":["confirmed"],"orderpayment":["1"],"ordermanufacturer":["none"],"ordercategory":["none"],"ordercurrency":[""],"orderpricestart":"",
"orderpriceend":"",
"orderuser":[""],"orderproduct":[""],"groupbyfields":"{\"name\":[]}",
"sortfields":"",
"use_system_limits":"0",
"max_execution_time":"",
"memory_limit":"",
"csvi_template_id":2,"tags":null}

Any ideas as to why my orders are not being exported? Like I said, when I run the export manually it will do it correctly, but when triggered by the mass-action it does not.

After looking at the documentation it seems there may be a way to trigger the export after all. It is not really how I want things to work, but it may solve both issues at once.... I still would want to find a way to get this mass-action triggering my exports in other words.

I can use the export URL as the redirect for when a user completes a payment. In theory the user will be redirected to the export URL when they finish up with PayPal triggering the export at which point would also include their own order as it would be then set to completed as well. Thoughts? I don't really like putting work arounds in place rather than using intended functionality though.
  1. more than a month ago
  2. RO CSVI
  3. # 10
Accepted Answer Pending Moderation
Scratch my previous idea, not really working out the way it did in my head... sigh
  1. more than a month ago
  2. RO CSVI
  3. # 11
Accepted Answer Pending Moderation
Hello,

The CSVI HikaShop plugin only triggers one template, if you want the plugin to do more, you can make a copy of the plugin and add whatever extra you want it to do. The plugin will add a filter that limits the export to only the order that has been set to confirmed. That is the form_orderlist variable.

The export template will only run if the template is set to to be used for cron or frontend and has a secret key set. The secret key must be set in the plugin as well. You can fire multiple templates by calling the URL you constructed more than once.

This particular plugin only responds to the trigger onAfterOrderCreate() which is called by HikaShop, if you want it to react to any other trigger, you would have to build that in your own plugin.

As to when plugins are triggered, that is all up to HikaShop, the CSVI plugin only responds to the trigger fired by HikaShop.

Hope that clears things up.
  1. more than a month ago
  2. RO CSVI
  3. # 12
Accepted Answer Pending Moderation
Hey! I have been doing some dev work on a project and have not had time to revisit this. I have everything working to my basic needs, but wanted to recap.

Can you address:

PRIORITY #2 (for me) - When exporting orders from HikaShop there is a field zone_name_english, which is the human readable name of the country the user lives in and is what I can use with USPS API, but I have found no way to get the friendly name for the user's state in the HikaShop orders export???

When my ERP system imports orders it pulls the incorrect state/province info. It will pull the hikashop reference to that. I can give you an example if needed, or if you can tell me what file to look in to make it point to the correct field/table that would be great!
  1. more than a month ago
  2. RO CSVI
  3. # 13
Accepted Answer Pending Moderation
Hello,
HikaShop stores country and state in one table #__hikashop_zone and as you said human readable field zone_name_english. The state info is also saved in the same table but the field to identify if its a country or state is zone_type. This field will have value as country for countries and state for states. You may need to add this field value as a filter in your queries to read the state information.
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
I am going to play around with filters and see if I can reproduce what you are talking about, but in the event that I cannot; can you please be a bit more specific?

EDIT: I have tried a few things, but it doesn't quite add up, how I would accomplish this. Can you please offer an example?
  1. more than a month ago
  2. RO CSVI
  3. # 15
Accepted Answer Pending Moderation
Hello,
I just realised that since you are doing HikaShop order export, you can use shipping_address_state and billing_address_state fields to get the state information in your export. Can you check if these fields helps?
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
Accepted Answer Pending Moderation
Yea, I will look into that now. Hopefully I missed that when I mapped the fields the past time. I think it showed up as a reference though. Here's hoping! Cheers
  1. more than a month ago
  2. RO CSVI
  3. # 17
Accepted Answer Pending Moderation
Hey, just checked it out and the following is what is output:

shipping_address_state
state_Texas_4307
state_Nieder__sterreich_440

billing_address_state
state_Texas_4307
state_Nieder__sterreich_440

Is there maybe a code change I can make to grab the correct field instead of grabbing the above? If not can you please give me an example on how to use the custom filter to achieve the same?
  1. more than a month ago
  2. RO CSVI
  3. # 18
Accepted Answer Pending Moderation
Hello,
In order to support readable format of country and state name in HikaShop order export, we have added few new fields for order export. You need to load the attached patch file and update your available fields to get these fields. You can then use country_name and state_name fields in your export to get the names of country and state. Try the export and let me know on how it goes.

patch_HS_order_2017_05_05.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. # 19
  • Page :
  • 1


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