[Skip to main content](#vessel-content)

#   Canpar plugin error

##

- **[spark-](/forum/user/35690-spark "View spark-'s Profile")**
- [![spark-'s Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/35690-spark "View spark-'s Profile") Topic Author
- [ Offline](/forum/user/35690-spark)

Less More

- Posts: 20
- Thank you received: 0
-
-

11 years 8 months ago [\#192323](#192323) by [spark-](/forum/user/35690-spark "View spark-'s Profile")  *[Canpar plugin error](/forum/28-shipping-methods/875277-canpar-plugin-error#192323 "-- HikaShop version -- : 2.3.5 -- Error-message(debug-mod must be tuned on) -- : Notice: Undefined index: XMLpackage in /home/bulkbu5/public&#95;html/sandbox/plugins/hikashopshipping/canpar/canpar.php on line 502  Notice: Array to string conversion in /home/bulkbu5/public&#95;html/sandbox/plugins/hikashopshipping/canpar/canpar.php on line 502  Notice: Array to string conversion in /home/bulkbu5/public&#95;html/sandbox/plugins/hikashopshipping/canpar/canpar.php on line 502  Fatal error: &#91;&#93; operator not supported for strings in /home/bulkbu5/public&#95;html/sandbox/plugins/hikashopshipping/canpar/canpar.php on line 523  I would get these errors when the grouped packages would exceed one (1). Each additional package over one would generate a string conversion error. I changed line 502 from  to  it seems to have repaired the issue for me. I also made this change to line 478. Please confirm if there is a better or alternate solution.  Also, the canpar base rate is appearing at the top of the checkout page. I'm not able to locate where in the code this is being generated. Please advise.  Thanks,  Steve")* was created by *[spark-](/forum/user/35690-spark "View spark-'s Profile")*

-- HikaShop version -- : 2.3.5
-- Error-message(debug-mod must be tuned on) -- : Notice: Undefined index: XMLpackage in /home/bulkbu5/public_html/sandbox/plugins/hikashopshipping/canpar/canpar.php on line 502

Notice: Array to string conversion in /home/bulkbu5/public_html/sandbox/plugins/hikashopshipping/canpar/canpar.php on line 502

Notice: Array to string conversion in /home/bulkbu5/public_html/sandbox/plugins/hikashopshipping/canpar/canpar.php on line 502

Fatal error: [] operator not supported for strings in /home/bulkbu5/public_html/sandbox/plugins/hikashopshipping/canpar/canpar.php on line 523

I would get these errors when the grouped packages would exceed one (1). Each additional package over one would generate a string conversion error. I changed line 502 from
Code:

$data['XMLpackage'] .= $this -&gt; _createPackage($data, $product, $rate, $order);

to
Code:

$data['XMLpackage'][] = $this -&gt; _createPackage($data, $product, $rate, $order);

it seems to have repaired the issue for me. I also made this change to line 478. Please confirm if there is a better or alternate solution.

Also, the canpar base rate is appearing at the top of the checkout page. I'm not able to locate where in the code this is being generated. Please advise.

[ ![cperror.jpg](/forum/attachment/22676) ](/forum/attachment/22676 "cperror.jpg")

Thanks,

Steve

- [ ![cperror.jpg](/forum/attachment/22676) ](/forum/attachment/22676 "cperror.jpg") [ ](/forum/attachment/22676?download=1 "cperror.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODc1Mjc3LWNhbnBhci1wbHVnaW4tZXJyb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

11 years 8 months ago [\#192358](#192358) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Canpar plugin error](/forum/28-shipping-methods/875277-canpar-plugin-error#192358 "-- HikaShop version -- : 2.3.5 -- Error-message(debug-mod must be tuned on) -- : Notice: Undefined index: XMLpackage in /home/bulkbu5/public&#95;html/sandbox/plugins/hikashopshipping/canpar/canpar.php on line 502  Notice: Array to string conversion in /home/bulkbu5/public&#95;html/sandbox/plugins/hikashopshipping/canpar/canpar.php on line 502  Notice: Array to string conversion in /home/bulkbu5/public&#95;html/sandbox/plugins/hikashopshipping/canpar/canpar.php on line 502  Fatal error: &#91;&#93; operator not supported for strings in /home/bulkbu5/public&#95;html/sandbox/plugins/hikashopshipping/canpar/canpar.php on line 523  I would get these errors when the grouped packages would exceed one (1). Each additional package over one would generate a string conversion error. I changed line 502 from  to  it seems to have repaired the issue for me. I also made this change to line 478. Please confirm if there is a better or alternate solution.  Also, the canpar base rate is appearing at the top of the checkout page. I'm not able to locate where in the code this is being generated. Please advise.  Thanks,  Steve")*

Hello Steve,
Can you show me some screenshots of how did you configured your Canpar shipping method so that I can test it on my end ?
Thanks.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODc1Mjc3LWNhbnBhci1wbHVnaW4tZXJyb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[spark-](/forum/user/35690-spark "View spark-'s Profile")**
- [![spark-'s Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/35690-spark "View spark-'s Profile") Topic Author
- [ Offline](/forum/user/35690-spark)

Less More

- Posts: 20
- Thank you received: 0
-
-

11 years 8 months ago [\#192444](#192444) by [spark-](/forum/user/35690-spark "View spark-'s Profile")  Replied by *[spark-](/forum/user/35690-spark "View spark-'s Profile")* on topic *[Canpar plugin error](/forum/28-shipping-methods/875277-canpar-plugin-error#192444 "-- HikaShop version -- : 2.3.5 -- Error-message(debug-mod must be tuned on) -- : Notice: Undefined index: XMLpackage in /home/bulkbu5/public&#95;html/sandbox/plugins/hikashopshipping/canpar/canpar.php on line 502  Notice: Array to string conversion in /home/bulkbu5/public&#95;html/sandbox/plugins/hikashopshipping/canpar/canpar.php on line 502  Notice: Array to string conversion in /home/bulkbu5/public&#95;html/sandbox/plugins/hikashopshipping/canpar/canpar.php on line 502  Fatal error: &#91;&#93; operator not supported for strings in /home/bulkbu5/public&#95;html/sandbox/plugins/hikashopshipping/canpar/canpar.php on line 523  I would get these errors when the grouped packages would exceed one (1). Each additional package over one would generate a string conversion error. I changed line 502 from  to  it seems to have repaired the issue for me. I also made this change to line 478. Please confirm if there is a better or alternate solution.  Also, the canpar base rate is appearing at the top of the checkout page. I'm not able to locate where in the code this is being generated. Please advise.  Thanks,  Steve")*

Here's my current config.
[ ![canpar&#95;config.jpg](/forum/attachment/22694) ](/forum/attachment/22694 "canpar&#95;config.jpg")

- [ ![canpar&#95;config.jpg](/forum/attachment/22694) ](/forum/attachment/22694 "canpar&#95;config.jpg") [ ](/forum/attachment/22694?download=1 "canpar&#95;config.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODc1Mjc3LWNhbnBhci1wbHVnaW4tZXJyb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[spark-](/forum/user/35690-spark "View spark-'s Profile")**
- [![spark-'s Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/35690-spark "View spark-'s Profile") Topic Author
- [ Offline](/forum/user/35690-spark)

Less More

- Posts: 20
- Thank you received: 0
-
-

11 years 8 months ago [\#192445](#192445) by [spark-](/forum/user/35690-spark "View spark-'s Profile")  Replied by *[spark-](/forum/user/35690-spark "View spark-'s Profile")* on topic *[Canpar plugin error](/forum/28-shipping-methods/875277-canpar-plugin-error#192445 "-- HikaShop version -- : 2.3.5 -- Error-message(debug-mod must be tuned on) -- : Notice: Undefined index: XMLpackage in /home/bulkbu5/public&#95;html/sandbox/plugins/hikashopshipping/canpar/canpar.php on line 502  Notice: Array to string conversion in /home/bulkbu5/public&#95;html/sandbox/plugins/hikashopshipping/canpar/canpar.php on line 502  Notice: Array to string conversion in /home/bulkbu5/public&#95;html/sandbox/plugins/hikashopshipping/canpar/canpar.php on line 502  Fatal error: &#91;&#93; operator not supported for strings in /home/bulkbu5/public&#95;html/sandbox/plugins/hikashopshipping/canpar/canpar.php on line 523  I would get these errors when the grouped packages would exceed one (1). Each additional package over one would generate a string conversion error. I changed line 502 from  to  it seems to have repaired the issue for me. I also made this change to line 478. Please confirm if there is a better or alternate solution.  Also, the canpar base rate is appearing at the top of the checkout page. I'm not able to locate where in the code this is being generated. Please advise.  Thanks,  Steve")*

I've also modified line 444 to accommodate a larger and heavier maximum box size. Code:

$limitation = array('length' =&gt; 80, 'weight' =&gt; 34, 'width' =&gt; 50, 'height' =&gt; 50);

This was based on your similar recommendation for the Canada Post plugin in thread [ www.hikashop.com/forum/shipping-methods/...t-plugin-issues.html](http://www.hikashop.com/forum/shipping-methods/874351-canada-post-plugin-issues.html)

Regards,
Steve

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODc1Mjc3LWNhbnBhci1wbHVnaW4tZXJyb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

11 years 8 months ago [\#192739](#192739) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Canpar plugin error](/forum/28-shipping-methods/875277-canpar-plugin-error#192739 "-- HikaShop version -- : 2.3.5 -- Error-message(debug-mod must be tuned on) -- : Notice: Undefined index: XMLpackage in /home/bulkbu5/public&#95;html/sandbox/plugins/hikashopshipping/canpar/canpar.php on line 502  Notice: Array to string conversion in /home/bulkbu5/public&#95;html/sandbox/plugins/hikashopshipping/canpar/canpar.php on line 502  Notice: Array to string conversion in /home/bulkbu5/public&#95;html/sandbox/plugins/hikashopshipping/canpar/canpar.php on line 502  Fatal error: &#91;&#93; operator not supported for strings in /home/bulkbu5/public&#95;html/sandbox/plugins/hikashopshipping/canpar/canpar.php on line 523  I would get these errors when the grouped packages would exceed one (1). Each additional package over one would generate a string conversion error. I changed line 502 from  to  it seems to have repaired the issue for me. I also made this change to line 478. Please confirm if there is a better or alternate solution.  Also, the canpar base rate is appearing at the top of the checkout page. I'm not able to locate where in the code this is being generated. Please advise.  Thanks,  Steve")*

Hello Steve,
I just tested it on my end, and I'm not having any notice/fatal error.
Regarding the number that is currently displayed during your checkout workflow when you publish your Canpar shipping method, you should edit the **canpar.php** file and change this line : Code:

echo($method['value']);

By : Code:

//echo($method['value']);

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODc1Mjc3LWNhbnBhci1wbHVnaW4tZXJyb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.052 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
