Promotion prices in shop

Promotion prices in shop

Saturday 12 August 2006 2:48:15 pm - 5 replies

Author Message

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

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

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