How do I count things users buy without products or hit counter?

(Charlotte Westney) #1

Matrix Version:

Hi everyone,

I had a permit system set up that used products, shopping cart and ecommerce default delivery method, so users could apply for a number of permits, and when they were all gone, it showed no more available in the dropdown for new applications.

When we upgraded, it all broke. Which is kind of ok, as it was a bit sketchy.

Is there anything I can use so when users sumbit a form, it decrements the number left?

From what i can see, hit counter is now deprecated, and products are going the same way? I don’t really want full ecommerce on this, I just want a way to have something start at 18, when a user buys 3 it goes to 15, and when it reaches 0, no more show in the dropdown for future applications.

Is there anything in Matrix that could do this?


(Nic Hubbard) #2

I could be wrong, but I think the Custom Form allows a submission limit. Would this work for you?

(Charlotte Westney) #3

Hi Nic, great to hear from you!

Sadly not in this case, as customers have to apply for permits in groups of 2, 3 or 4, so one submission would decrease the overall amount left by a different amount.

Good to know that though for other things in the future!

(Bart Banda) #4

You could potentially do something with a trigger that updates a metadata field based on some value of the POST data.

You could use the set metadata value trigger action and use a dynamic keyword that does something like


Would something like that work?

(Charlotte Westney) #5

Hi Bart,

This is brilliant - thank you!
Got it working today, also used a post variable to select the page to update the metadata on. So I now have a permit system where users select the day they want and number of permits needed and when they submit it decreases that dates count of permits down by the 2, 3 or 3 the user selected. Awesome!

Thanks again,