Updated order and cart management in R172
With the R172 release we have made some updates on the way we handle carts and orders to prevent partial payments on non-seamless payment gateways.
The change implied the separation of the cart ID from the order ID and a format change for the CartID cookie value. Before R172, the CartID cookie value used to be composed exclusively from digits (ex: "12345") and, with R172 release, the format has been updated to be an unique identifier composed from digits, letters and dashes (ex: "698148b7-12fc-4d47-a040-32e8a8357060").
We haven't included this change in the release notes, because the only BC endorsed method to use the CartID cookie (Hiding the "Shopping Cart Is Empty" message) doesn't reference the value of that cookie but only tests for the existence of that cookie (and that was not changed).
Based on some customer reports indicating broken functionality on e-commerce sites, we've done some investigations to determine the need of a system update to correct this issue. We've reached the conclusion that the above format change should have no impact on any JavaScript code we inject on a site, excepting the case when there is some customer code in the page that try to call directly our internal methods (UpdateItemQuantity, ApplyDiscountCode, ApplyGiftVoucher and ValidateCart), which we don't document or support. Therefore, we will not push any update to modify this behavior.
However, if you do use these methods and are impacted by these changes, you have the following options:
- Use the "{module_oid}" in the site template, if you need the Order ID (ex: insert "<input type="hidden" id="realOrderId" value="{module_oid}" />" in the page template and then use some JavaScript code to get the value at runtime)
- Use the CartID cookie and make sure you support the new format (although you should not have any format problems in JavaScript) if you need the Cart ID
Cristinel Anastasoaie
Adobe Business Catalyst Product Manager
