Share » Forums » Developer » Webshop pricing - creating cumulative...

Webshop pricing - creating cumulative price additions when combining seperate products

Webshop pricing - creating cumulative price additions when combining seperate products

Friday 10 September 2004 3:37:54 am - 15 replies

Author Message

Paul Forsyth

Friday 10 September 2004 3:44:16 am

Its perfectly possible with eZ. Though the best way to handle is debatable. This is basically a product option situation. You have:

ring + no stone
ring + stone x
ring + stone y
etc.

I think the new multi option datatype would work for you. Its in 3.5 but i think you can just copy the code over to 3.4. Look at:

http://pubsvn.ez.no/websvn/listing.php?repname=nextgen&path=/&sc=1

and navigate to kernel/classes/datatypes/ezmultioption. I can have a go at pulling it out for you if you want.

If this doesnt work for you the other way to go is to use related objects to include the other objects. I've done this in the past.

paul

steve walker

Friday 10 September 2004 5:20:51 am

Paul,

Thanks for the response. Its something of a relief to know this achievable.

I'll investigate the info you've sent through and let you know how I get on. I guess there isnt any information on the new datatype as yet?

Cheers, Steve.

http://www.oneworldmarket.co.uk

Paul Forsyth

Friday 10 September 2004 5:32:47 am

I havent heard of anyone using it yet. I guess try it and see ;) It should be similar to the current ezoption datatype.

paul

steve walker

Friday 10 September 2004 5:33:39 am

Paul,

I'm trying to grab the files from the svn area, from:

http://pubsvn.ez.no/websvn/listing.php?repname=nextgen&path=%2Ftrunk%2Fkernel%2Fclasses%2Fdatatypes%2Fezmultioption%2F&rev=0&sc=1

but am finding that files like ezmultioptiontype.php are a image, see:

http://pubsvn.ez.no/websvn/filedetails.php?repname=nextgen&path=%2Ftrunk%2Fkernel%2Fclasses%2Fdatatypes%2Fezmultioption%2Fezmultioptiontype.php&rev=0&sc=1

Is possible to get the code file versions?

Thanks, Steve.

http://www.oneworldmarket.co.uk

Paul Forsyth

Friday 10 September 2004 5:55:45 am

The best way would be to check out the trunk with svn. If you prefer i could wrap up the files as an extension and send them across.

paul

Bård Farstad

Friday 10 September 2004 5:59:52 am

Here is an example of a shop which uses this feature.
http://www.minelinser.no/content/view/full/5009/

And here:
http://ez.no/products/online_editor

I recommend trying to shop the last product to see how this feature works ;)

--bård

Documentation: http://ez.no/doc

steve walker

Friday 10 September 2004 6:50:22 am

Bard,

In the case of the Ez OE products - arent these just 4 distinct products that happen to include OE as part of the package?

Steve.

http://www.oneworldmarket.co.uk

Bård Farstad

Friday 10 September 2004 7:10:51 am

Steve,

no the OE product is one product in eZ publish ( our ez.no installation ). This product has a price of 0$ and we price the different options, using the option datatype.

--bård

Documentation: http://ez.no/doc

Paul Forsyth

Friday 10 September 2004 7:12:33 am

Steve,

Hope that code works for you :)

I just posted an offtopic but slightly relevant thread here:

http://ez.no/community/forum/suggestions/rfc_repository_for_backporting_useful_features_from_3_5

paul

steve walker

Monday 13 September 2004 5:28:21 am

Paul,

Thanks for the extension - works like a dream. If anyone would like a copy of it before 3.5 is released mail me via steve _at_ oneworldmarket.org and I'll pass it on.

A couple of questions:

- In my product type, there are always the same 6 additional multi options - is it easy to hardcode the options into the class so that all products have them, as opposed to having to add the 6 options everytime you add a new product (they have 600 products at any one time!)

- The multioption uses a dropdown to represent the additional product options - how difficult would it be to add an image to represent the product option?

Many thanks for the help on this.

Steve.

http://www.oneworldmarket.co.uk

steve walker

Monday 04 October 2004 7:10:08 am

Hi there,

Multi option is up and running - but with one snag...

If I choose a multioption and then 'add to the basket' the price in the basket is the price of the product *without* the addition of the option.

Is there a basket or ezprice hack required so that it picks up the price thats the addition of both, as well as product details of the additional option?

Thanks, Steve.

http://www.oneworldmarket.co.uk

Paul Forsyth

Monday 04 October 2004 8:52:14 am

Ah, yes. I didnt look closely enough at how the multioption was carried through. A small change is needed to basket.php.

I've committed the 3.5 version of basket.php to pubsvn. Replace your current kernel/shop/basket.php with this one.

In addition, when you display your multioption datatype make sure it is within the <form> tags. Otherwise the information is not passed through to basket.php. I just made this mistake ;)

paul

steve walker

Tuesday 05 October 2004 5:59:24 am

Paul,

It works in terms of getting the additional options to the checkout page, but the cost still doesnt seem to integrated into the product... so I get:

Quantity 	VAT 	Price 	Discount 	Total Price 	 	
12211129 	
 	17.5 % 	£ 1,814.20 	0% 	£ 1,814.20 	 	
Selected options

Additional Rings	Ring 6	£ 500.00	
Subtotal Inc. VAT: £ 1,814.20

The price of the product is 1814.20... the 500 pound additional price is there but not added in.

When you checked it did you see this price being integrated?

Regards, Steve.

http://www.oneworldmarket.co.uk

Paul Forsyth

Tuesday 05 October 2004 8:10:44 am

I forgot another class ;)

Look at pubsvn again at: backports/3.5 to 3.4/extension/ezmultioption/kernel/classes/ezproductcollectionitem.php

Replace in your current kernel. It has the update for the multioption inside.

paul

steve walker

Tuesday 05 October 2004 9:53:31 am

Excellent, thanks Paul.

Its now working fine!

Steve.

http://www.oneworldmarket.co.uk

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu