WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Bakery Shop => Topic started by: Shefra on March 08, 2012, 04:10:48 PM

Title: Discount
Post by: Shefra on March 08, 2012, 04:10:48 PM
Hello,

Is there a possibility to add a discount ? And if so is it also possible to use the disccount only when buying 4 or more peaces of 1 product.

Thanks in advance 
Title: Re: Discount
Post by: jacobi22 on March 08, 2012, 04:29:59 PM
its possible, if you change the code, 3,4 ours if you know something about PHP and the bakery-code

Its not possible with the actuell Version of bakery without code-work
Title: Re: Discount
Post by: Bug on March 08, 2012, 08:33:44 PM
Basically:

Add a field to the database in the bakery items table called something like discount

Add an input field to the modify item phph and do not forget to add it to the save item php

Now you can fill in a discount amount

In overview php and view item php get the new values and do some math

$price = $price - $discount;

You also need to add these new things to

- view cart and templates cart

- view summery and templates summary





Once you get into it you will come up with amazing extra features

Discount in percentages,

Display the discount, display new and old price, change the layout depending on wheter the item has a discount etc etc

Title: Re: Discount
Post by: Shefra on March 09, 2012, 08:51:40 AM
Thanks Bug....This helps.
Title: Re: Discount
Post by: Bug on March 12, 2012, 07:17:10 PM
Are you making a new shop or is it an existing bakery page...

I got something that has all the discount options (even a time scheduler for the discount)...

Title: Re: Discount
Post by: Shefra on March 12, 2012, 08:10:28 PM
With existing bakery page you mean the standard bakery module? I'm using the standard bakery shop. If you want the share it, it would be appreciated.

Thanks in advance.

Title: Re: Discount
Post by: scratch on May 02, 2012, 12:20:19 AM
Does any bogy have the modified files or code that they could post to enable the discount code please?
I'm really struggling to implement it...

Many thanks
Title: Re: Discount
Post by: Shefra on May 02, 2012, 08:29:22 AM
Scratch,

I modified the view, add and modify files. When a customer add more than X pieces there is a discount of Y procent discount.

Frank