I use a third party platform to manage my shipping called ShipperHQ. It allows me to offer click and collect and delivery with calendar dates and time slots.

That platform creates it's own tables in my DB with the main table being called shipperhq_order_detail.

The columns I need to retrieve are :

  • dispatch_date
  • delivery_date
  • time_slot
  • pickup_location
  • carrier_type
  • carrier_group_detail

I need to be able to retrieve them for use in transactional emails for New Order confirmation at the end of checkout and in the admin etc. then return them as email variables or render them in a phtml block that I call in to the email code.

Their base module which I am using is - Shipper HQ github if it helps

In the admin, their module shows the data from carrier_group_detail on the order view page and by "re-using" their block and helper code I've managed to add the same data to New Order emails. The emails work when sent from the admin using the "Send Email" link but fail at the success point of checkout with the error

"Error filtering template: We can't get the order instance right now."

I'm guessing that's because the blocks I'm re-using are in the "Adminhtml" section in blocks and not available to the frontend.

I'm not an advanced developer and I've spent weeks trying to fix this but I'm getting nowhere.

All I'm trying to do is

  1. Once an order is placed go get the data
  2. Add it to transactional emails via a phtml file

I am sorry if this seems long winded but I'm really struggling with this and have been for weeks and would really appreciate your help everyone as our customers are getting confused because they store pickup dates in US date format, i.e. yyyy/mm/dd in the DB not UK so the month and day are in the wrong order.

By default, in their extension, they don't share those columns for use in emails. They only expose {{delivery_Date}} and that is back to front.

My dev site is currently M2.3.2 but live is still on M2.2.8 because I'm stuck trying to fix the above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.