0

I think this may be a bug, but it's not a biggy.

I have a product channel with a price by member group field. My orders get saved to Orders and Purchased items channels, both based on standard setup iirc. My purchased items channel includes a Price field {purchased_price} type: CartThrob Price - Simple.

If someone places an order where the price is ZERO (registered members can book event places for free), then the purchased item stores the price as e.g. YToyOntpOjA7YToyOntzOjEyOiJtZW1iZXJfZ3JvdXAiO3M6MToiNSI7czo1OiJwcmljZSI7czoxOiIwIjt9aToxO2E6Mjp7czoxMjoibWVtYmVyX2dyb3VwIjtzOjA6IiI7czo1OiJwcmljZSI7czoxOiI1Ijt9fQ== not £0 as expected.

YToyOntpOjA7YToyOntzOjEyOiJtZW1iZXJfZ3JvdXAiO3M6MToiNSI7czo1OiJwcmljZSI7czoxOiIwIjt9aToxO2E6Mjp7czoxMjoibWVtYmVyX2dyb3VwIjtzOjA6IiI7czo1OiJwcmljZSI7czoxOiI1Ijt9fQ==

I realised that is a base64 encoding of something, that turns out to be e.g a:2:{i:0;a:2:{s:12:"member_group";s:1:"5";s:5:"price";s:1:"0";}i:1;a:2:{s:12:"member_group";s:0:"";s:5:"price";s:1:"5";}} - which appears to be the array of member prices available.

The orders channel correctly stores the total order price as £0.00, and the {order_items} price is also 0, this only affects the purchased items channel. If an order is placed for any price > 0, then it stores the selected member price as expected. So i suspect 0 is being taken for null somewhere?

{exp:cartthrob:debug_info} shows price as 0 (uses customer price) all the way thru the process.

Like I say, it's not critical for me, as the one place I am using a report of individual items, I can use the hilarious grep workaround {if purchased_price ~ "/..................../"}£0{if:else}{purchased_price}{/if} (assume long strings are not for billion pound orders!) but it would be good to know whether it's a real thing or not.

2
  • Out of curiosity, what version of CT and EE is this?
    – Matt
    Commented Jun 27, 2016 at 15:16
  • ee 2.10.1, cartthrob 2.70 Commented Jun 28, 2016 at 18:48

1 Answer 1

0

(I'm with Vector; we make CartThrob)

Thanks for reporting this! I've logged it in our bug tracker and, if it's a global issue, we'll evaluate it for fix in the next CT3 release!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.