PDA

View Full Version : Product dynamic price updating


maniac_uk
21-Dec-2003, 04:46 PM
Hi...

I have developed a new site, my first, which has a matrix of choices for material (paper or canvas) and size (5 sizes) both in drop-down boxes.

Can someone tell me how to dynamically update the product page price, even with a calculate button, without having to go to the View Basket page to see the price?

All help gratefully received.

Mike Needham

NormanRouxel
21-Dec-2003, 06:12 PM
Actinic is very weak when it comes to dynamic pricing. The best you can do out of the box is to add price info to your choice descriptions. However if you have two sets of choices that interact then it's even more difficult.

You could replace your two choices with a single bigger drop down list with the price in the choice name e.g.

Paper - Size 1 - £1
Paper - Size 2 - £2
Paper - Size 3 - £3
Paper - Size 4 - £4
Paper - Size 5 - £5
Canvas - Size 1 - £2
Canvas - Size 2 - £4
Canvas - Size 3 - £6
Canvas - Size 4 - £8
Canvas - Size 5 - £10

You have to remember to keep these values in sync with the permutation prices.

Norman

maniac_uk
21-Dec-2003, 10:47 PM
Thanks Norman...

Unfortunately it is more difficult, as we have 5 sizes (and prices) for paper and 5 sizes (and prices) for canvas... so the drop downs may be heavily populated and therefore not user friendly.

I will try another route...

I will let you know how I get on...

Mike

maniac_uk
21-Dec-2003, 10:49 PM
Opps...

I forgot to say we have one thing on our side...

The prices are static for all products so the matrix is quite good.

i.e. the 5 prices for paper are the same for all products and the 5 prices for canvas are the same for all products...

Mike

NormanRouxel
22-Dec-2003, 01:16 AM
i.e. the 5 prices for paper are the same for all products and the 5 prices for canvas are the same for all products...

In that case it would be worthwhile having some JavaScript that calculates and displays the total price. You could use a custom template for these products that will do the job.

Post an example of your pricing matrix and I'll have a think about how it could be done. Also let me know if there will be other attributes/choices or components on these products.

Norman

maniac_uk
22-Dec-2003, 09:03 AM
Hi Norman...

The pricing matrix of material and sizes for ALL products depends on whether the item is square or rectangular, which I have set up a Custom Property ACT_TYPE for use in the code using S or R as the variable content for each individual product.

SQUARE price matrix
==============

Size Paper Canvas

130x130 £145.00 £165.00
100x100 £125.00 £145.00
75x75 £100.00 £125.00
55x55 £90.00 £115.00
30x30 £50.00 £65.00

RECTANGULAR price matrix
===================

Size Paper Canvas

195x130 £145.00 £165.00
150x100 £125.00 £145.00
112.5x75 £100.00 £125.00
82x55 £90.00 £115.00
60x42 £50.00 £65.00

See what you think...

You help is much appreciated.

Mike

NormanRouxel
22-Dec-2003, 12:41 PM
Will these products have other choices than the above?

Norman

cdicken
22-Dec-2003, 04:01 PM
Will these products have other choices than the above? 'Cause if they don't, you can have two products - one called 'Paper' and one called 'Canvas'. Each of t.hese will have two components - 'Square' and 'Rectangular'. Each of the components can have a 'Size' attribute with the range of size choices within it. Make the components optional, and select the box labelled 'Include [None] As Attribute Choice List'.

That way, each of your products ('Paper' and 'Canvas') will have two drop downs ('Square' and 'Rectangular') and people can select the size they want from the appropriate drop-down

maniac_uk
22-Dec-2003, 05:42 PM
Hi guys...

No each product only has these choices relating to the SQUARE or RECTANGULAR price lists NOT BOTH...

The product will already have been identified via the Custom Property as Square or Rectangular in its creation so the price band for the product will be fixed as either the SQUARE matrix or the RECT matrix using S or R.

Mike

NormanRouxel
22-Dec-2003, 09:35 PM
It can be done without any JavaScript of patching! Just make a single list of choices containing all the possible permutations ans some cunning use of the HTML for Name fields in these choices will build a pretty table. See the attched graphic for an example.

SQUARE price matrix
==============

Size Paper Canvas

130x130 £145.00 £165.00
100x100 £125.00 £145.00
75x75 £100.00 £125.00
55x55 £90.00 £115.00
30x30 £50.00 £65.00

RECTANGULAR price matrix
===================

Size Paper Canvas

195x130 £145.00 £165.00
150x100 £125.00 £145.00
112.5x75 £100.00 £125.00
82x55 £90.00 £115.00
60x42 £50.00 £65.00

To implement the above:-

Create a product of zero price.

Now create a component withing that product called "Frame" (or whatever you need).

Within that Component create an Attribute called "Type".

In this Attributes "HTML for Name" field put (the single long line):-

<table bgcolor="#bbddff"><tr><td bgcolor="#aaccee" colspan=3><b>SQUARE</b></td></tr><tr align=center><td>Size</td><td>Paper</td><td>Canvas</td></tr><tr><td>130x130</td><td>

For this Attribute create choices in the following sequence:-

Name Field HTML For Name Field

Square / Plain 130x130 £145</td><td>
Square / Canvas 130x130 £165</td></tr><tr><td>100x100</td><td>
Square / Paper 100x100 £125</td><td>
Square / Canvas 100x100 £145</td></tr><td>75x75</td><td>
Square / Paper75x75 £100</td><td>
Square / Canvas 75x75 £125</td></tr><td>55x55</td><td>
Square / Paper 55x55 £90</td><td>
Square / Canvas 55x55 £115</td></tr><tr><td>30x30</td><td>
Square / Paper 30x30 £50</td><td>
Square / Canvas 30x30 £65</td></tr><tr><td bgcolor="#aaccee" colspan=3><b>RECTANGULAR</b></td></tr><tr><td>195x130</td><td>
Rectangular / Paper 195x130 £145</td><td>
Rectangular / Canvas 195x130 £165</td></tr><tr><td>150x100</td><td>
Rectangular / Paper 150x100 £125</td><td>
Rectangular / Canvas 150x100 £145</td></tr><tr><td>112.5x75</td><td>
Rectangular / Paper 112.5x75 £100</td><td>
Rectangular / Canvas 112.5x75 £125</td></tr><tr><td>82x55</td><td>
Rectangular / Paper 82x55 £90</td><td>
Rectangular / Canvas 82x55 £115</td></tr><tr><td>60x42</td><td>
Rectangular / Paper 60x42 £50</td><td>
Rectangular / Canvas 60x42 £65</td></tr><table>

Now open this Component and under "Permutations" do "Fill List" and enter all the prices as per above.

Finally Edit Act_VariantAttributeName.html and replace "<BR>" with " " (a single space).

That should now give you a pretty matrix, with the price displayed for each possible combination.

For more products you can just duplicate this one (or just it's component) by copy and paste.

Norman

maniac_uk
22-Dec-2003, 10:00 PM
Wow...

That is a cool table implementation...

I would never have thought of that.

I really thank you for that solution Norman.

Now I can see why you are a Senior Member.

I presume you are on the beta testing panel, if there is one...

If not you should be.

Thanks again.

Mike

NormanRouxel
22-Dec-2003, 10:11 PM
I was fiddling with JavaScript, Custom Templates and NETQUOTEVAR:VARIANTATTRIBUTE's and suddenly it came to me that it could all be done within Actinics existing capabilities. What a relief. The cunning bit is that some of the HTML for each cell is spread between the preceding attribute and the current one, so be careful if you add / remove rows.

Norman

p.s. You automatically get promoted to Senior Member when you post over 100 messages. I wonder what will happen when I get to 1,000!

NormanRouxel
22-Dec-2003, 10:18 PM
Whoops. I've just spotted some invalid HTML. Here are the affected lines.

Square / Canvas 100x100 £145</td></tr><tr><td>75x75</td><td>
Square / Canvas 75x75 £125</td></tr><tr><td>55x55</td><td>

Norman

maniac_uk
22-Dec-2003, 10:33 PM
Thanks Norman...

<tr>'s bon...

Mike

maniac_uk
08-Mar-2004, 07:46 PM
Hi again Norman...

The site is now live at:

www.artfactoryonline.com (http://www.artfactoryonline.com/)

IT IS A LIVE SITE...
PAYMENT MEANS A VALID ORDER IS RAISED!!!

You can see the implementation of your code for the product pricing...

It works a treat...

Thanks for your help.

Mike