Forum

Thread tagged as: Error, Shop

Perch Shop Error

Getting the following error in cart:

Warning: array_merge(): Argument #1 is not an array in admin/addons/apps/perch_shop/lib/PerchShop_Cart.class.php on line 494.

The cartID that it's referencing doesn't seem to exist, weirdly, hence the if if (count($json)) { check not working (as the $json is returning false).

Same diagnostics as (https://forum.grabaperch.com/forum/07-06-2017-perch-shop-error). If you need any further information, please let me know.

Ryan Gittings

Ryan Gittings 1 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, when does this happen?

Ryan Gittings

Ryan Gittings 1 points
Registered Developer

This happens when viewing the cart using perch_shop_cart()

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is this the same install that you've been hacking at? We can't support that.

Ryan Gittings

Ryan Gittings 1 points
Registered Developer

No core files have been modified, apart from the marked "to do" as per my other post.

Ryan Gittings

Ryan Gittings 1 points
Registered Developer

Diagnosing further, in PerchShop_Cart:

// Add the sale prices for reference // Used by sale price promos if ($cart['cartPricing'] != 'sale') {

The cart pricing returns "standard". This check then gets passed, and then $item['ref_sale_prices'] gets populated with sale prices. So if a sale price hasn't been set, an empty price is returned.

Hope that helps!

Drew McLellan

Drew McLellan 2638 points
Perch Support

ref_sale_prices can be empty, that shouldn't be an issue. There's no sale prices, so it's empty.