MyParcel plugin nor working with custom fields

  • Posts: 183
  • Thank you received: 10
  • Hikashop Business
4 months 3 weeks ago #357324

-- HikaShop version -- : 5.0.2
-- Joomla version -- : 3.10.12
-- PHP version -- : 8.1.0

I just bought the MyParcel plugin but I can't get it work. I think the problem is that we use our own created Hikashop custom address fields for name, street + number and postal code. Is there a wat to map the MyParcel required fields to my own custom fields?

The error I get is: 0 MyParcelNL\Sdk\src\Model\Consignment\AbstractConsignment::setFullStreet(): Argument #1 ($fullStreet) must be of type string, null given, called in ..\plugins\hikashop\myparcel\myparcel.php on line 436

When I next fill the default street field I get the error:

Error in MyParcel API request: 0 - data.shipments[0].recipient.person Must be at least 1 characters long - Failed validation against JSON-SCHEMA shipment/post_shipments_request-v1.1.json (request_id: 343434343434343434343) Url: api.myparcel.nl/shipments Request: {"data":{"shipments":[{"recipient":{"":0}}]}}

Hope this can be fixed...

Last edit: 4 months 3 weeks ago by Rixters.

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
4 months 3 weeks ago #357326

Hi,

You would have to edit the file plugins/hikashop/myparcel/myparcel.php
Search for the address_street and address_post_code texts and replace them with the column name of your own custom fields and that should do it.

Please Log in or Create an account to join the conversation.

  • Posts: 183
  • Thank you received: 10
  • Hikashop Business
4 months 2 weeks ago #357441

Thanks!

I created some queries to combine all street names columns into the default address column. An option to set a custom field as the house number was present in the plugin settings.

The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

Time to create page: 0.066 seconds
Powered by Kunena Forum