Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Cart66 Variable Pricing vs Inventory Question WordPress

So I have a question about Cart66 inventory vs pricing changes.

Essentially my problem is this. I am trying to set up a business selling art prints on Wordpress, using Cart66 for the e-commerce side of things. But the way I want to set up pricing on Cart66 relates directly to inventory. The more of a certain print I have, the lower the price. As prints get sold, the price goes up, to encourage users to buy prints earlier rather than later.

So essentially I'd like the prices to change based on the inventory numbers for that item, prices are less if there is a lot of inventory, more if there isn't. I have a feeling I'm looking for a hard code answer. I already contacted the Gravity Forms staff to see if they could provide an easier solution, but they recommended getting a coder involved. Does Cart66 have a solution that I'm not seeing? Or is there a Cart66 hard code solution that I could use. I am lost when it comes to coding on Cart66, so a non coding alternative would be preferable.

Any help is greatly appreciated! Thanks!

Answers (3)


Daniel answers:

You might be able to use jQuery to search and replace prices based on a price or pre-applied class. Just an idea to get the ball rolling.

CaptHouser comments:

That's not a bad idea. I've been so focused on Cart66, that I forgot about using jQuery. Not seeing forests for trees. I'd still need some time to research that solution though.

Daniel comments:

I use Cart66 on my website, but I haven't seen a need to do what you are suggesting.


Daryl Lozupone answers:


The cart66 product prices are stored per item in the database. It does not have a built-in mechanism for modifying the price based on inventory.

You would have to hook into the post-sale routine that reduces the inventory when an item is sold, and have that also increase the price by a fixed amount( e.g. $100, 25%, etc). This would require additional functions to be coded and fired when an item is sold.

Upon just glancing at the documentation, there is a hook, cart66_after_order_saved, that may give you the access to the data and the ability to modify the pricing.

I hope that helps.

CaptHouser comments:

That definitely gets me closer. I still have a log way to go in understanding Cart66 enough to implement those changes. But your documentation hook is a step closer to a solution and that's a help.

Daryl Lozupone comments:

The jQuery approach will be very difficult because the product prices are not part of the <em>Add to Cart</em> or <em>Checkout</em> forms.


Arnav Joy answers:

I am very much agree with "Daryl Lozupone" answer , you have to use a hook provided bycart66 to modify the price in the table , so when inventory level goes upto a certain limit then you can increase the price of the product , let me know if you need help in implement this to your site.

CaptHouser comments:

Yeah. His answer looks right to me too. And I will definitely need help implementing this on the site. Definitely.