HubBox Error: _messageErrorTemplate is not a function

Problem Statement On searching the wrong address in the HubBox popup, there is no error message. When checked on the console, you are getting an error like “_messageErrorTemplate is not a function“. Solution The error: “_messageErrorTemplate is not a function” is coming because this function is not declared as function in the HubBox library. To […]

Read More

HubBox Error: Failed to open stream /sample/../../vendor/autoload.php

Problem Statement While using the library provided by HubBox, there is an error occurring- require(C:\wamp64\www\HubBox\sample\src\public/../../vendor/autoload.php): failed to open stream: No such file or directory in C:\wamp64\www\HubBox\sample\src\public\index.php on line 14 Solution This error occurred because of dependencies on files that are missed. You need to solve this issue by using below steps: Step1: Delete the file sample/composer.lock from the library. Step2: Make a folder with the name “vendor” under /sample/ Step3: Run the command “composer install” in command prompt at /sample/   It will download all the dependency files which are required. After successfully downloading all the dependencies, you will able to use the HubBox library.

Read More

Namespace in PHP

Objective: To learn how we can use same name of the class in PHP using namespace. Generally we cannot use two or more class with the same name. It will give an error: “Cannot redeclare class” as shown below- To handle this, we can use the namespace as shown in the example given below: 1. […]

Read More

Auto Loading in PHP

Objective: To learn how we can use any instance of class without including the class file. Generally, If we want to use the instance of any class then first we need to include the class file by any of the 4 functions: include include_once require require_once Like below, // included all the classes require "classes/Testing1.php"; […]

Read More

Spring Global (Spring Omni) Error: Shipment is not being Registered

Problem Statement: Shipment is not being registered on the sent timestamp and also no error is reporting in the response. Solution: We have raised a ticket for the same and they replied that this issue was occurred because recipient’s email parameter was not sent in the Shipment API https://api.myparcel.com/shipments According to the Spring Omni documentation, […]

Read More

Spring Global (Spring Omni) Error: The property phone_number is required

Error in the response: The property phone_number is required while registering the shipment. Solution: This error is occurring when recipient’s phone_number parameter is not sent in the Shipment API https://api.myparcel.com/shipments According to the Spring Omni documentation, phone_number is an optional parameter: We raised ticket on Spring Omni and they replied: The shipment is failing to […]

Read More