Another ecommerce issue


(Pomster09) #1

Hi guys

 

I'm building a cart and checkout system in Squiz. An issue that I'm failing to resolve, is whenever I add items to the cart, 3 x apples, then test the checkout button, those 3 apples have been added to the previous 3 apples, I've tested the form three times and now I have 9 apples.

 

Can I stop it from caching my previous order?

 

Cheers


(Aleks Bochniak) #2

Turn caching off on your cart assets. 


(Pomster09) #3

Hi Aleks

 

Is there a setting for this? I added the root folder of my cart and checkout to the cache manager and selected no caching, but when testing the form I'm still getting the values adding up together, so now I have 18 apples, when I only asked for 3. Is there a place or function where I can select caching on the cart itself?


(Pomster09) #4

Does the product code have a replacement keyword?


(Bart Banda) #5

You should be able to disable caching for specific assets i n the cache manager as well, but your issue sounds more like a session issue perhaps? Are you clearing/restarting your session everytime you are wanting to reset your e-commerce form? You can also confirm that there is no caching by using the cart when you are logged in as a system admin as you would then bypass the cache (if you have group permission caching turned off that is). 

 

Are you able to actually also go to the cart itself and clear your orders completely and then try adding new products?


(Pomster09) #6

I'm not sure Bart, it's an issue that persists until an order has been placed and confirmed; only after that process does it clear.

 

Can I ask another question or two regarding ecommerce?

 

1) Is there a way of using an asset list of some type to print out a list of all orders, I've used an asset list to print out the asset contents, but all I see are order titles, I want the contents of the order, amounts and values.

2) How can I print the contents, including metadata, to a readable format, that I can send through to the warehouse for distribution. 

 

Please see attached image to refer to both issues.

 

Cheers

 

[attachment=772:28-09-2015 4-23-55 PM.png]

28-09-2015 4-23-55 PM.png (361 KB)

(Bart Banda) #7

In 5.2.6.1 we did add a new keyword to be able to access the XML data using a keyword, you can then use keyword modifiers to extract any value from the XML. 

 

https://squizmap.squiz.net/matrix/7556

 

 

Following up on #7202, a new keyword is added to allow the Transaction Response XML stored in Orders, to be exposed in the bodycopies of Ecommerce system, or in Ecommerce emails.

%transaction_response% will print the Transaction Response XML from payment server. This keyword is available in Thank You / Receipt Bodycopy and Ecomerce Form email format.

Keyword modifiers can be used to extract contents from XML string.

(

 

Is that what you need? You should then be able to print any data from the order, in addition to the metadata of each order as per normal metadata keywords. 


(Pomster09) #8

Thanks Bart, that does sound close to what I need.

 

My need is a real world problems that nearly all ecommerce systems address.

  • A retails shop purchases stock from a supplier
  • The stock item has a SKU (a code which identifies that stock item, similar to an ISBN in books)
  • When a customer purchases an item, an inventory adjustment is made
  • When stock levels are low, the shop owner puts in an order to the supplier
  • Supply warehouses are very large, and storing items by name would be too hard, so the stock is stored according to it's SKU
  • The supplier requests all orders are placed using a CSV, and that the first column is the SKU

A problem for me is that I didn't fully read the matrix manual before I built an order form.

 

On the product asset item, there's no place for a SKU, so I added a metadata field for this. On completing some test orders, I now find I can't get that ecommerce order metadata from Squiz.

 

I have managed to extract the XML, though again, there's no way of grabbing the data from it, to dynamically build my CSV.

 

Sadly we're on 5.1.5.1 so it may be sometime before I can see if the new solution works, though do the new keywords include one for getting metadata values from the ecommerce asset?

 

The most ideal solution would be functionality like there is on the custom forms, where I can just download the submissions logs. Actually, I just assumed the checkout and cart would have this functionality, otherwise with hindsight I would have used a custom form. 


(Bart Banda) #9

Each order you create from the checkout or ecommerce form becomes an asset, so can't you apply the metadata to that asset when the order is put through? Might be harder to do with shopping cart orders as you can have multiple products all in one order, but there may be a sneaky trigger way around it. The E-Commerce system in matrix wasn't really designed with what you are asking in mind, as it was designed a long time ago as well unfortunately. There may be additions to the ecommerce package we do in the future, but sounds like you might be after a full fledged enterprise ecommerce product like magento? 

 

Regardless, if you can somehow perhaps store dynamic additional data about the order into a metadata textarea field perhaps, you could maybe then extract all that info into an asset listing and list your CSV that way? Even if you had to run some JS processing on it it might be the only way.