Jump to content



Photo
* * * * * 2 votes

Get 1 Free


  • Please log in to reply
380 replies to this topic

#1   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 8,019 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 18 March 2007 - 04:55

This contribution allows you to promote a product by giving a free product when
the customer buys a specified number of the product you are promoting. This is
commonly used for a "buy two, get one free" promotion, but it is more versatile
than that:
* The qualifying quantity of the product you are promoting can be any number,
including one.
* The free product can be the same as the promoted product or any other product
in your catalog.
* You can limit the free product to one per order or any number that you wish.
* Like specials, you can set a date for the offer to expire.
* You can have any number of products in this promotion with different
requirements for each.

The free product is automatically added to the customers shopping cart when they
purchase a qualifying product in the qualifying quantity (or more.) The free
product is removed when the customer removes the qualifying product from their
cart or reduces the quantity below the qualifying quantity. The customer cannot
increase the number of free products without qualifying for them. It's designed
to be fairly foolproof.

Here's the Contribution page.

Edited by kymation, 18 March 2007 - 04:59.

My Addons

Banners Box Download Support
Categories Accordion Box Download Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box Download Support
Get 1 Free 2.2x Support
Price in Cart Only/MAPP Download Support
Modular Front Page Download Support
Modular SEO Header Tags Download Support
MVS 2.2x Support
PDF Datasheet Download Support
Price Updater 2.2x
Products Specifications 2.3.x Development Version Support Bugs/Suggestions
Request a Review Download Support

Shopping List Download Support New!
Specials Image Overlay Download Support
Superfish Categories Box Download Support
Theme Switcher 2.3+ Support  Updated


#2   rkscscc

rkscscc
  • Members
  • 97 posts
  • Real Name:RKS Computer Solutions
  • Gender:Male
  • Location:South Africa

Posted 18 March 2007 - 06:15

Hiya Jim, thanks for this great contrib, just saw it coming through on my RSS feed, I'm sure it will be a great asset to any site... Once I get it installed sometime within the next week, will give you feedback on it...

Check for it to be installed in my online shop here


Riaan
Riaan

#3   rkscscc

rkscscc
  • Members
  • 97 posts
  • Real Name:RKS Computer Solutions
  • Gender:Male
  • Location:South Africa

Posted 18 March 2007 - 06:53

Add-on to the above --> Probably one of the best written install files I've seen in the last month!
Riaan

#4   rkscscc

rkscscc
  • Members
  • 97 posts
  • Real Name:RKS Computer Solutions
  • Gender:Male
  • Location:South Africa

Posted 18 March 2007 - 07:21

Jim, I installed it, and all looks well... It adds the free product in the shopping cart at 0.00, so that bodes well...

My question to you is this, if you do look at my shop, this link, that's where I added it, just added another Toshiba notebook to it to test...

1. You say in the readme that currently it will not display on the main product which products you will get, mind if I give you an idea and you think about it? Would it be possible to edit product_info.php to check for freebies for the main product, and maybe just add a line (pointing to the freebie) that buying X amount of this product will get you Y amount of he freebie? ----- Scrap that idea! -- Maybe link that says, "Click here to find out what freebies you get with this product", and clicking it will open a popup linked to the freebie product's info (pulled from product_info.php) for the freebie product.

2. If you look at my store, 99% of all my products will eventually have attributes attached to them. Maybe it can be done that a freebie product can be allocated certain attributes to it when it is given as a freebie for another product. Sounds crazy, but if i sold a Qosmio notebook, I wouldn't want to give a standard black mousepad with it, but the main freebie(mousepad) in a silver(attribute of mousepad)...

Hope this will get you thinking!

Cheers again for a great contrib!
Riaan

#5   rkscscc

rkscscc
  • Members
  • 97 posts
  • Real Name:RKS Computer Solutions
  • Gender:Male
  • Location:South Africa

Posted 18 March 2007 - 07:26

First problem, not sure if problem but needs to be confirmed

When the main product is removed from the cart, the freebie remains. In all fairness it does put the correct price on it, but shouldn't it be linked to the main product and also removed? [Puts on client thinking cap]Can just see a few clients adding a main product to the cart, later remove it and then find out that when they confirmed their order and obviously didn't check their cart, that they got billed for extra items which they did not want...
Riaan

#6   mirakol

mirakol
  • Members
  • 1 posts
  • Real Name:Mira K

Posted 18 March 2007 - 08:32

Great contribution! /thumbsup.gif' class='bbc_emoticon' alt=':thumbsup:' />

Just one question... is it possible to specify a multiple of the free product per promotion?

for example: buy 4 get 2 free, BUT NOT buy 2 get 1...

thanks again - easy install & works great.

#7   rkscscc

rkscscc
  • Members
  • 97 posts
  • Real Name:RKS Computer Solutions
  • Gender:Male
  • Location:South Africa

Posted 18 March 2007 - 11:04

Second Problem, this is definitely a problem

Jim, the multiplier doesn't work... Tried making it 2 M400-139 freebies for buying 1 Qosmio, but it only adds it to the cart as 1...

---------------------------
Mira has a great idea!
Riaan

#8   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 8,019 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 18 March 2007 - 17:45

Wow -- I never expected this number of comments this fast. Looks like a lot of you were looking at the RSS feed. I'll try to answer everybody in one place here. Feel free to post again if I didn't answer yours properly.

I thought of adding something to the product page as advertisement (and the link to the free product is a good idea.) However, I've had Contributions that never got posted due to feature creep, so I gave up and just put this one up without it. This is definitely on the wish list for a future update. You can always just add some text to the product page as a workaround.

Attributes is another problem. This just takes so long to code that I went without it. As a workaround, create a product with no attributes to use as your free product. You can put this in a hidden directory (see the hidden directory contribution.) I'll add this on to the wishlist as well.

The free product remaining in the cart is definitely a problem. I missed that one. This could be a bit tricky to fix. I'll put this bug first on the list to fix.

There's currently no way to specify multiple free products for a given purchase, it's just one free per n purchased. The multiplier is a limit -- it prevents the customer from getting more free products than you want to give, for those of us who want to only give one freebie per order. It can be more than one, but it's just a maximum limit. I'll add a multiple free products field to the wishlist.

I hope that's everybody. If not, let me know.

Regards
Jim

My Addons

Banners Box Download Support
Categories Accordion Box Download Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box Download Support
Get 1 Free 2.2x Support
Price in Cart Only/MAPP Download Support
Modular Front Page Download Support
Modular SEO Header Tags Download Support
MVS 2.2x Support
PDF Datasheet Download Support
Price Updater 2.2x
Products Specifications 2.3.x Development Version Support Bugs/Suggestions
Request a Review Download Support

Shopping List Download Support New!
Specials Image Overlay Download Support
Superfish Categories Box Download Support
Theme Switcher 2.3+ Support  Updated


#9   candleman

candleman
  • Members
  • 65 posts
  • Real Name:JP
  • Gender:Male
  • Location:West Virginia, USA

Posted 20 March 2007 - 12:29

Great contrib! I have been looking for something like this. Besides leaving the item in the cart bug I noticed on the admin side that I can't set an item from active to inactive. When I click on the set inactive light, the page refreshes, but does not change the status.

One other thing is when it gives you the free item in the cart it does not add the weight of the item to the rest of the carts contents. Is there a way to keep the item free, but add the weight to the carts total? The way it is now, the estimated shipping quotes that come back from UPS or USPS can be way off depending on the weight of the item your giving for free.

Thanks again for the excellent contib /thumbsup.gif' class='bbc_emoticon' alt=':thumbsup:' />
Currently running 76 contibutions.

#10   essevi2001

essevi2001
  • Members
  • 32 posts
  • Real Name:Enzo Scuderi
  • Gender:Male
  • Location:Italy/Romania

Posted 23 March 2007 - 19:47

Hi Jim!
thank you very very much for this nice and UNIC contrib!
I have installed it in a few minutes and work fine on this end!
I have a question: I have setting a free one for 4 buyed items. Is possible to buy 4 different items and to get the free items instead of 4 identic items?
I tried to set all products of a category as elegibles and, for all elegible items as set the same free one, but do not
does what i want... So, is not possible at all?

If you like to try go to my site www.romeomodels.com and add to the cart items on Napoleonics Category. The free is the first on list.

Thanks in advance for reply!

Enzo

Edited by essevi2001, 23 March 2007 - 19:49.


#11   galaxy101

galaxy101
  • Members
  • 5 posts
  • Real Name:Chris Mentch

Posted 25 March 2007 - 22:07

Yes, I am also looking for the feature to be able to buy multiple of any item and get one free. This could be limited to items in the same product category. My client, who needs this feature, only sells one type of product (but 5 styles of it) entered as different products. The customer should be able to choose any 2 different items and get one free.

Thanks for your consideration.

#12   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 8,019 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 25 March 2007 - 23:09

I haven't been neglecting this topic (well, not deliberately) I've just been really busy. I have fixed most of the bugs that everyone has reported, including a few that I've found since. If things don't gt any crazier I'll have an update in the next day or so. Just a couple more things to take care of....

The current code does not allow multiples of different products to qualify. It must be a quantity of a single product to trigger the free product(s). This is partly a result of the peculiar system I used for securing the shopping cart against customers gaming the system to get unearned free products. This is turning out to be a bit of a headache, but I'm finally close to getting all of the bugs sorted. It may be possible to allow a qualifying quantity of any product that has been selected for this promotion, but it would take a fair amount of customization. The current system only looks at one product at a time, so it doesn't even see the other products.

Regards
Jim

My Addons

Banners Box Download Support
Categories Accordion Box Download Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box Download Support
Get 1 Free 2.2x Support
Price in Cart Only/MAPP Download Support
Modular Front Page Download Support
Modular SEO Header Tags Download Support
MVS 2.2x Support
PDF Datasheet Download Support
Price Updater 2.2x
Products Specifications 2.3.x Development Version Support Bugs/Suggestions
Request a Review Download Support

Shopping List Download Support New!
Specials Image Overlay Download Support
Superfish Categories Box Download Support
Theme Switcher 2.3+ Support  Updated


#13   galaxy101

galaxy101
  • Members
  • 5 posts
  • Real Name:Chris Mentch

Posted 26 March 2007 - 06:02

I haven't been neglecting this topic (well, not deliberately) I've just been really busy. I have fixed most of the bugs that everyone has reported, including a few that I've found since. If things don't gt any crazier I'll have an update in the next day or so. Just a couple more things to take care of....

The current code does not allow multiples of different products to qualify. It must be a quantity of a single product to trigger the free product(s). This is partly a result of the peculiar system I used for securing the shopping cart against customers gaming the system to get unearned free products. This is turning out to be a bit of a headache, but I'm finally close to getting all of the bugs sorted. It may be possible to allow a qualifying quantity of any product that has been selected for this promotion, but it would take a fair amount of customization. The current system only looks at one product at a time, so it doesn't even see the other products.

Regards
Jim


Couple things... I just downloaded the zip file today...

1. In "catalog/includes/classes/shopping_cart.php", there is a hard coded date and time where it checks for expiration .... Should this be changed to >= date("Y-m-d H:i:s") ???

2. Since I do need "multiple product from a category to get X free", I would like to create a separate contribution (based on your code) that will detect multiple products under one category in a cart and add the specified free product to the cart. I've been working on it tonight and I almost have the admin side working properly. It will get a little tricky with parent-child categories, but it should not be too bad.... This could be integrated at a later time.

Chris

#14   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 8,019 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 27 March 2007 - 03:06

Couple things... I just downloaded the zip file today...

1. In "catalog/includes/classes/shopping_cart.php", there is a hard coded date and time where it checks for expiration .... Should this be changed to >= date("Y-m-d H:i:s") ???

2. Since I do need "multiple product from a category to get X free", I would like to create a separate contribution (based on your code) that will detect multiple products under one category in a cart and add the specified free product to the cart. I've been working on it tonight and I almost have the admin side working properly. It will get a little tricky with parent-child categories, but it should not be too bad.... This could be integrated at a later time.

Chris

Rats. I was hoping that I could get rid of that test code before anybody noticed. Yes, that line should be
if ($get_1_free['get_1_free_expires_date'] <= date('Y-m-d H:i:s')) {
I've moved that code into a new method, since it gets used in several places now, so you might want to look at the new version. Yes, I have fixes for most of the bugs, and some new (requested) features as well. I'll put this up as soon as I get instructions written. Real Soon Now.

You are of course welcome to modify this code to anything that you want. Please put your modifications up as a contribution when you are done. You could add it to this contribution as an option if you want.

Regards
Jim

My Addons

Banners Box Download Support
Categories Accordion Box Download Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box Download Support
Get 1 Free 2.2x Support
Price in Cart Only/MAPP Download Support
Modular Front Page Download Support
Modular SEO Header Tags Download Support
MVS 2.2x Support
PDF Datasheet Download Support
Price Updater 2.2x
Products Specifications 2.3.x Development Version Support Bugs/Suggestions
Request a Review Download Support

Shopping List Download Support New!
Specials Image Overlay Download Support
Superfish Categories Box Download Support
Theme Switcher 2.3+ Support  Updated


#15   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 8,019 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 27 March 2007 - 22:07

An updated version (1.1) has been added to the Contribution page. I recommend that everyone who is using Version 1.0 upgrade to the new one. The changes are:

Bug fixes:
* Fixed the active/inactive buttons on the admin page.
* Fixed an intermittent bug where the Calendar dropdown prevented the Expiry date from updating.
* Fixed the code to properly set the weight of free products and to count them in the total.
* Fixed a bug that converts a free product to full price if you remove the qualifying product. Mostly. This still seems to occur randomly. I'm working on isolating the cause so that I can fix the code.
* Replaced test code in the date handling function with the correct production code. Expiry dates should now be used properly.
* Fixed a bug that prevented free products from showing up in the Admin Orders pages.

New features:
* Added the ability to set the number of free products sent with a qualifying order.
* Added promotional text to the Products Info page (for qualifying products.)

The free product still can't have attributes. I intend to fix this someday, but it's a low priority right now since the workaround is so easy. Please post here if you find any more bugs, or if you have any more ideas for improvement.

Regards
Jim

My Addons

Banners Box Download Support
Categories Accordion Box Download Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box Download Support
Get 1 Free 2.2x Support
Price in Cart Only/MAPP Download Support
Modular Front Page Download Support
Modular SEO Header Tags Download Support
MVS 2.2x Support
PDF Datasheet Download Support
Price Updater 2.2x
Products Specifications 2.3.x Development Version Support Bugs/Suggestions
Request a Review Download Support

Shopping List Download Support New!
Specials Image Overlay Download Support
Superfish Categories Box Download Support
Theme Switcher 2.3+ Support  Updated


#16   tropolite

tropolite
  • Members
  • 6 posts
  • Real Name:Troy Schuster

Posted 28 March 2007 - 13:07

Hey all...

Anyone else having problems downloading version 1.1a of the Get One Free contrib??

I keep getting an error when I try to open the zip file.


Cheers
Tropolite

#17   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 8,019 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 29 March 2007 - 03:18

Hey all...

Anyone else having problems downloading version 1.1a of the Get One Free contrib??

I keep getting an error when I try to open the zip file.
Cheers
Tropolite

That was odd. The file is fine on my computer, but the uploaded file was broken. I've uploaded it again. Please let me know if you have problems with this one.

Regards
Jim

My Addons

Banners Box Download Support
Categories Accordion Box Download Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box Download Support
Get 1 Free 2.2x Support
Price in Cart Only/MAPP Download Support
Modular Front Page Download Support
Modular SEO Header Tags Download Support
MVS 2.2x Support
PDF Datasheet Download Support
Price Updater 2.2x
Products Specifications 2.3.x Development Version Support Bugs/Suggestions
Request a Review Download Support

Shopping List Download Support New!
Specials Image Overlay Download Support
Superfish Categories Box Download Support
Theme Switcher 2.3+ Support  Updated


#18   tt2k

tt2k
  • Members
  • 28 posts
  • Real Name:Marco

Posted 29 March 2007 - 08:23

Hello,

first, i want to say that´s a very nice contribution .. i test a little bit around and i think i found a little bug..

i add a get1free product on the admin site.. like buy 2 chairs and get 1 table for free.. so when i add 2 chairs to the shopping cart, the table added automatic.. thats ok .. but now when i press the update card button ( i changed nothing), the table are added again but now with full price, so it´s look like:

2 chairs (full price)
1 table (for free)
1 table (full price)

i hope you understand my bad english /smile.gif' class='bbc_emoticon' alt=':)' />

Best regards
Marco

#19   stuh

stuh
  • Members
  • 4 posts
  • Real Name:Stu Hodgson

Posted 29 March 2007 - 12:43

Couple things... I just downloaded the zip file today...

1. In "catalog/includes/classes/shopping_cart.php", there is a hard coded date and time where it checks for expiration .... Should this be changed to >= date("Y-m-d H:i:s") ???

2. Since I do need "multiple product from a category to get X free", I would like to create a separate contribution (based on your code) that will detect multiple products under one category in a cart and add the specified free product to the cart. I've been working on it tonight and I almost have the admin side working properly. It will get a little tricky with parent-child categories, but it should not be too bad.... This could be integrated at a later time.

Chris


Chris, Your Multiple Product (from categories) buy to get one free (the cheapest) is exactly what i have been looking for, for a couple of months. Have you managed to get yours working ?

Since i am looking for the same thing if you need any help i would be happy to oblige

Stu

#20   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 8,019 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 31 March 2007 - 03:02

Hello,

first, i want to say that´s a very nice contribution .. i test a little bit around and i think i found a little bug..

i add a get1free product on the admin site.. like buy 2 chairs and get 1 table for free.. so when i add 2 chairs to the shopping cart, the table added automatic.. thats ok .. but now when i press the update card button ( i changed nothing), the table are added again but now with full price, so it´s look like:

2 chairs (full price)
1 table (for free)
1 table (full price)

i hope you understand my bad english /smile.gif' class='bbc_emoticon' alt=':)' />

Best regards
Marco

Yes, that's a bug. I've been looking for a solution but I don't have much time to work on this right now. It's definitely on the bug list though.

Regards
Jim

My Addons

Banners Box Download Support
Categories Accordion Box Download Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box Download Support
Get 1 Free 2.2x Support
Price in Cart Only/MAPP Download Support
Modular Front Page Download Support
Modular SEO Header Tags Download Support
MVS 2.2x Support
PDF Datasheet Download Support
Price Updater 2.2x
Products Specifications 2.3.x Development Version Support Bugs/Suggestions
Request a Review Download Support

Shopping List Download Support New!
Specials Image Overlay Download Support
Superfish Categories Box Download Support
Theme Switcher 2.3+ Support  Updated