Promotion prices in shop

Author Message

Claudia Kosny

Saturday 12 August 2006 2:48:15 pm

Hello

I am looking for a good way to implement promotional prices within the EZ shop functionality.
Example:
Normally a product costs 10.00 Euros. Now we run a promotion for this product and reduce the price to 8.00 Euros. But as we want to show all customers that we reduced the price we still want to display the old price (e.g. striked through) so we still need the old price. After the promotion period we want to use the original price of 10.00 Euros again.

At the moment I just have the following idea:
Keep an additional float field in the product class which will contain the price not used right now.
Keep two additional date fields in the product class wich will contain the start and the end date of the promotion period.
Write an extension which offers the product editor a nice interface to insert the necessary data. Write a cronjob that will check each day whether the either the start or end date of the promotion is reached and exchanges the current price with the backup price.

So my questions now are:
Is there a way to do this with the discount system in EZ?
If not - does anyone see any problems which could arise from using my idea or does anyone have an easier approach?

Thanks for any help

Claudia

Mateusz Paprocki

Wednesday 09 January 2008 11:02:36 am

This is my first post on this forum, so I'd like to say hi to all eZ users! :)

Hi Claudia,
Did you manage to implement your idea?
I have to implement similar functionality(except for date) and I'm also considering using extension/module.

After looking at kernel, I found that product price is defined by the first found attribute of an object of type "price"(or multiprice).

ezshopoperationcollection.php, lines 341-350 (eZ 3.10), method addToBasket()

        foreach ( $attributes as $attribute )
        {
            $dataType = $attribute->dataType();
            if ( eZShopFunctions::isProductDatatype( $dataType->isA() ) )
            {
                $priceObj =& $attribute->content();
                $price += $priceObj->attribute( 'price' );
                $priceFound = true;
            }
        }

Promotion price functionality requires 2 price attributes in object(product), so this lines have to be changed.

So, what will be the best way to implement this?

Cheers,
Mateusz.

Mickael Robin

Wednesday 13 February 2008 2:21:21 am

Hi Mateusz,

I might have missed something, but if you dont need to manage dates for a promotional period, maybe that the most simple way is to use default "discount rule" functionnality :
=> you create a rule (% of reducation) that you apply to a selection of products.

Hope this helps :-)
-----------
MikRob

stephen Gazard

Friday 15 February 2008 4:25:13 am

Hello,

I'm using eZpublish 3.8.10 under Apache and MySQL

I understand the concept above, but cannot see how to apply it. the manual http://ez.no/doc/ez_publish/technical_manual/3_10/concepts_and_basics/webshop demonstrates that it's possible, but the actual application of it appears to be lacking anywhere that I've found in the forum.

The post at http://ez.no/developer/forum/developer/different_prices_for_different_user_groups/re_different_prices_for_different_user_groups__1
seems to describe what I need to do, but as I'm not familiar with eZpublish, I've no idea quite where to go. I tried going into the user section and I just got lost.

I've gone into the admin, then into 'webshop' and then discounts. I see one field which appears to be a name for the discount, unless it's a rule, and I've certainly not found the rule syntax listed anywhere. I'm trying to apply a global 10% discount to all products

Currently we manually apply the sale item by editing each product (tedious)

Help would be appreciated
Cheers,
sgakagiz

Mateusz Paprocki

Friday 15 February 2008 8:36:26 am

Hi!

@Mickael

This is some kind of option, but(let's say) that your client is interested in having discount price 11999.99 for a product which normally costs 11942.43.
Imagine the client calculating right percent rule to apply ;) (it would be about 4.8197896073077254796553130309326% - not too nice, isnt't it? Also, it wouldn't be possible due to the datatype limitations ;) ).
Thanks for your time anyway!

@Stephen

This field, "which appears to be a name for the discount", is a link. If you click on it, it will take you to the screen where you can define a discount rule. Good luck!

Cheers,
Mateusz.

stephen Gazard

Saturday 16 February 2008 1:55:51 pm

Mateusz,

thanks for that. It's not the way I would have designed it to work. I've added a promotion of 10% on a site, applied it to 'any product' and added all user groups that were setup to the discount. It shows up as a discounted price.

However, I'm not sure how to add a line to actively show that a discount has been applied to the product in the 'checkout' section. Any suggestions?

Regards,
Stephen

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.