24/7 Support: 800.608.6482

Get Started

How To Guides

How To Guides

How To Use Cached Product Prices

In Miva 9.07.00 we introduced a new performance saving feature to allow any Miva store to pre-calculate product discounted price:

https://docs.miva.com/how-to-guides/product-list-caching

This new feature gives you a nice performance boost because instead of calculating the price in real-time as the page loads, Miva is instead reading the price as a static value from the database. On list view pages, this time savings can add up, especially if your store has a lot of price groups.

Before we walk through how the new cached product prices work, let's clarify how the software worked pre-9.07.00.

Sale Price vs Display Predicted Discounts

One of the biggest misunderstandings related to showing the sale price on pages is the “Display Predicted Discounts” option. This setting is not required to show the sale price on a page.

Here are the admin settings (in point and click mode)

Admin Settings

To get the sale price to show you simply set the displayed price to “Sale Price”. Then if you want a base/retail price to show with a line through it under the additional price display you choose one of those options.

This will give you a layout like this:

Sale Price

It's important to note that you do not need the “Display Predicted Discounts” option checked to show the correct sale price.

Display Predicted Discount

If the Display Predicted Discount is not needed to control the sale price then what is it used for? This settings allows you to show any potential discount to the customer IF they added the product to the cart. This would allow you to display any basket level discounts at the item level BEFORE the customer added the item to the cart.

Enabling this setting does not impact the actual product price. It only gives you a list of discounts that are affecting the product price (ie any Product level discounts) + any basket level discounts that would change the product should the product be added to the cart.

Example:

Product Level Discount


Here the first two discounts listed are the product discounts taking the product price down to $17.74, while the 3rd is a basket discount which will get applied once the product has been added to the cart.

Point and Click Mode vs Advanced Mode

It's important to note that there is a difference between point and click mode and advanced mode.

Point and Click Mode Settings:

Display Predicted Discount

Advanced Mode Settings:

Advanced Mode Setting

You’ll notice in Advanced Mode there is only a single option for “Calculate Predicted Discounts and Sale Price”. This means that in point and click mode you MUST have this box checked to get the correct sale price. (pre-9.7)

You’ll notice in Advanced Mode there is only a single option for “Calculate Predicted Discounts and Sale Price”. This means that in point and click mode you MUST have this box checked to get the correct sale price. (pre-9.7)

However, this logic changes in 9.07.00 when we added Cached Product Prices.

Cached Product Prices

Pre Calculate Discount

Cached Product Prices works by pre-calculating any product level discount and saving its value in the database so it does not need to be calculated in real time. This pre-discount is done via a scheduled task which by default runs once per day (but this can be adjusted).

In 9.07.00 on Product List pages (PLST, CTGY, SRCH Related Products), Miva will automatically use the cached product price if it is available.

This means that you actually want to un-check the option to “Calculate Predicted Discounts and Sale Price” unless you need want the ability to display the Predicted Discounts as individual line items.

If you only want the correct sale price, as long as the scheduled task has been run, Miva will automatically show the correct discounted product price. As a best practice to get the full performance gain out of the new cached product prices you want to uncheck the the “Calculate Predicted Discounts and Sale Price” on product lists pages.

This will give you the correct sale price for product while still taking advantage of the performance gain for the product price caching.

One important thing to note is on non-product list pages such as PROD you still need that option selected to get the correct sale price. Since only 1 product price is being calculated the overhead is far less compared to search/category pages.

Looking for Developer Docs?

We have a whole section for that, including: Developer Training Series, Template Language docs, Module Development tutorials and much, much more.

Head to the Developer Section

Miva believes that all online businesses should have access to a scalable ecommerce platform that can meet their unique business requirements. Miva offers PCI compliant ecommerce, hosting, and custom website design and development solutions. Miva customers have processed over $100 billion in online sales since 1997.

Copyright © 2016 Miva, Inc - All Rights Reserved   Privacy Policy | Store Policy

Links
Contact Us
Receive Tips & Updates

Copyright © 2017 Miva, Inc - All Rights Reserved

Back To The Top