WP SITES

3086 Coded Tutorials & 289 Plugins

Price Setup for Product Add-ons When Using Multiple Attributes

The Apple style product add-on plugin on this site is easy to setup when using 1 attribute, however, when using multiple attributes the pricing is a bit tricky to calculate as the code needs to calculate the price difference and add it within the buttons based on the regular price entered for each variation as seen in this screenshot :

Click Image to Enlarge

Here’s an example using 2 attributes.

  • 1 for memory
  • 1 for storage

Here’s a table which simplifies the pricing as this is the most complicated configuration requirement to get the buttons displaying the correct dynamic pricing based on the following 2 attributes for memory and storage.

Memory16GB24GB32GB
Storage256GB512GB1TB2TB

How to set regular prices for variations

MemoryStorageRegular Price
16GB256GB$1,200
16GB512GB$1,400
16GB1TB$1,600
16GB2TB$1,800
24GB256GB$1,400
24GB512GB$1,600
24GB1TB$1,800
24GB2TB$2,000
32GB256GB$1,600
32GB512GB$1,800
32GB1TB$2,000
32GB2TB$2,200

Note the regular pricing is not what you might expect.

Here’s the screenshots showing the entire setup from the backend to the frontend.

Supports multiple attributes.

Leave a Reply

New Plugins