Jump to content



Latest News: (loading..)

* * * * * 2 votes

Get 1 Free


  • Please log in to reply
363 replies to this topic

#41   kymation

kymation

    Believers

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

Posted 24 May 2007 - 06:38 PM

View Postdabbidu, on May 24 2007, 11:15 AM, said:

<snip>
Did anyone have the same problem or did anyone have a workaround for this problem.

Thanks for any help!
You're right, that does seem to be a bug. This is undoubtedly a result of my trying to be sneaky and hiding the free products from the customer (so they can't run up the free quantity without buying the non-free products.) I'm beginning to think that this design was a bad idea. Oh well, I'll see if I can figure out what's going on with this one.

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#42   dabbidu

dabbidu
  • Members
  • 3 posts
  • Real Name:Mueller

Posted 24 May 2007 - 07:19 PM

Wow, thanks for your fast answer... :lol:
I hope it isn't to much work to find the bug :rolleyes:

Greets

#43   keo77

keo77
  • Members
  • 20 posts
  • Real Name:Alan Keogh

Posted 27 May 2007 - 03:24 PM

I have installed the get 1 free contribution but I dont know how to set up the new table is this done in the oscommerce admin console, or outside?

#44   kymation

kymation

    Believers

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

Posted 28 May 2007 - 12:28 AM

Read the use.txt file in the distribution.

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#45   keo77

keo77
  • Members
  • 20 posts
  • Real Name:Alan Keogh

Posted 28 May 2007 - 03:34 PM

I have had a look at the use.txt file but I am unable to carry out any of the tasks as when I am in the admin console and have clicked on Catalog & Get 1 Free all I get is the following message:

1146 - Table 'hoopsdir_i497osc.get_1_free' doesn't exist

select count(*) as total from products p, get_1_free g1f, products_description pd where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = g1f.products_id

[TEP STOP]


I was presuming that this was happening as I had not set up the table? im a bit of a newbie to this so I've never had to set up a new table before.

Im a bit confused as to what to do with the get_1_free SQL File.

Edited by keo77, 28 May 2007 - 03:39 PM.


#46   kymation

kymation

    Believers

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

Posted 29 May 2007 - 11:45 PM

View Postkeo77, on May 28 2007, 08:34 AM, said:

I have had a look at the use.txt file but I am unable to carry out any of the tasks as when I am in the admin console and have clicked on Catalog & Get 1 Free all I get is the following message:

[b]1146 - Table 'hoopsdir_i497osc.get_1_free' doesn't exist
<snip>
That's your problem; you need to install the table before it will work. Most hosting services have some form of database manager, usually phpMyAdmin. If your host doesn't provide a database manager, or you are running your own system, go get a copy of phpMyAdmin and install it. This will allow you to upload and run the SQL file included in the distribution, or copy the SQL code from the file and paste it into a window and execute it. The exact details will vary depending on which database manager you are using and which version. Hosting services usually have instructions on using their tools, and there is good support for phpMyAdmin. Post again if you are still having problems and we'll figure it out.

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#47   jsruok

jsruok
  • Members
  • 38 posts
  • Real Name:Jussi Ruokomaki
  • Location:Finland

Posted 31 May 2007 - 11:04 AM

View Post2-b-fit, on Apr 25 2007, 05:43 PM, said:

"Get 1 free 1.1b" seems to be empty to me!?

I'm experiencing the same problem.

#48   kymation

kymation

    Believers

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

Posted 31 May 2007 - 04:34 PM

View Postjsruok, on May 31 2007, 04:04 AM, said:

I'm experiencing the same problem.
I don't know what is causing the failed file uploads. That's the second time this has happened to this Contribution. In any case, I've added version 1.2 to the stack. I downloaded and checked it and it appears to be OK, so please post here or PM me if it's not.

This is a rollup of the bugfixes posted here (the same as 1.1b) and a copy of Ed's customer notification modifications file, so everything is in one package.

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#49   evaland

evaland
  • Members
  • 19 posts
  • Real Name:richard

Posted 02 June 2007 - 05:05 PM

Dear sir,
Really  thank you for this very nice contrib.

I found some problem seems like bug in the /catalog/shopping_cart.php also.

I created a buy 1 product-A can get a Free-product-B
wheh I add the product-A to the shopping_cart,it's normal.
(please see the pic1.jpg)
[img]http://www.evaland.com.tw/temp/pic1.jpg[/img]

But bug happen when I change the product-A's quantity to 2 in the shopping_cart.
It show the two  Free-product-B in the shopping_cart,
and the most important , please see the second Free-product-B's price,it shows it's real price $30 not $0
(please see the pic2.jpg)
[img]http://www.evaland.com.tw/temp/pic2.jpg[/img]
Sir,can you help fix this problem

#50   kymation

kymation

    Believers

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

Posted 02 June 2007 - 05:32 PM

This problem has been mentioned before. I now think that a complete rewrite will be needed to cover all of the problems with this method. I don't have time to do this right now, but I will work on it as soon as I have time.

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#51   evaland

evaland
  • Members
  • 19 posts
  • Real Name:richard

Posted 02 June 2007 - 05:40 PM

Thanks your reply sir,
I will happy wait you

View Postkymation, on Jun 3 2007, 01:32 AM, said:

This problem has been mentioned before. I now think that a complete rewrite will be needed to cover all of the problems with this method. I don't have time to do this right now, but I will work on it as soon as I have time.

Regards
Jim


#52   evaland

evaland
  • Members
  • 19 posts
  • Real Name:richard

Posted 03 June 2007 - 05:51 AM

I found a little bug in the install.txt
in install.txt about modify the catalog/checkout_process.php.

// start Get 1 free
    // If this product qualifies for free product(s) add the free products
    if (is_array ($free_product = $cart->get1free ($products_id))) {
      // Update products_ordered (for bestsellers list)
      //   Comment out the next line if you don't want free products in the bestseller list
      tep_db_query("update " . TABLE_PRODUCTS . " set products_ordered = products_ordered + " . sprintf('%d', $free_product['quantity']) . " where products_id = '" . tep_get_prid($free_product['id']) . "'");

      $sql_data_array = array('orders_id' => $insert_id,
                              'products_id' => $free_product['id'],
                              'products_model' => $free_product['model'],
                              'products_name' => free_product['name'],
                              'products_price' => 0,
                              'final_price' => 0,
                              'products_tax' => '',
                              'products_quantity' => $free_product['quantity']
                             );
      tep_db_perform(TABLE_ORDERS_PRODUCTS, $sql_data_array);

      $total_weight += ($free_product['quantity'] * $free_product['weight']);
    }
// end Get 1 free

missing the "$"

it should be
'products_name' => $free_product['name'],

#53   kymation

kymation

    Believers

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

Posted 03 June 2007 - 05:55 AM

Bother. I thought that I changed that everywhere. Obviously not. Thanks for the notice. I'll get it in the next version.

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#54   patrickdk

patrickdk
  • Members
  • 1 posts
  • Real Name:Patrick

Posted 07 June 2007 - 12:09 PM

Hi

Thanks for this great contribution.

All my products are on attributte level.
Is it possible to change the admin, so i can choose porducts on attribute level?

Kind Regards

#55   thedream

thedream
  • Members
  • 64 posts
  • Location:The Barbades

Posted 19 June 2007 - 05:07 PM

Great contrib, thank you kymation !

I confirm there is a small bug in the shopping cart:
When you do an update on the shopping cart page (shopping_cart.php) and modifying the quantity of the free product OR another one, the shopping cart set the product quantity (the one you have to pay) to 1, and the free product  is deleted !
The trick is if the number of product you have to pay is under the number set in the admin part, and you set the amount required, the process is going well. But if you do another time setting 1 more, the free products desappear again!

Any ideas to correct this?
osCommerce 2.2 MS2 in 6 languages
TVA Intracomm
Numbers of visitors online
Who's online Enhancement
....

#56   thedream

thedream
  • Members
  • 64 posts
  • Location:The Barbades

Posted 19 June 2007 - 05:35 PM

View Postthedream, on Jun 19 2007, 06:07 PM, said:

Great contrib, thank you kymation !

I confirm there is a small bug in the shopping cart:
When you do an update on the shopping cart page (shopping_cart.php) and modifying the quantity of the free product OR another one, the shopping cart set the product quantity (the one you have to pay) to 1, and the free product  is deleted !
The trick is if the number of product you have to pay is under the number set in the admin part, and you set the amount required, the process is going well. But if you do another time setting 1 more, the free products desappear again!

Any ideas to correct this?
***UPDATE***
I have found something interesting !:
This case appear only when the offer concern the same products, for example: if you get 2 chairs and you get the third one free, you will  get the update bug ! insteed of if you get 2 chairs you get 1 table free, the update bug doesn't appear!
Hope this help  Kymation...

Edited by thedream, 19 June 2007 - 05:36 PM.

osCommerce 2.2 MS2 in 6 languages
TVA Intracomm
Numbers of visitors online
Who's online Enhancement
....

#57   fatbeatscom

fatbeatscom
  • Members
  • 13 posts
  • Real Name:Blake Barnaby

Posted 26 June 2007 - 03:00 PM

Free item does not add to the cart.  

Hello, I just added this contribution.  Most of it seems to work fine.  I made a modification for the listing in product_info.php to display another value of the free item, and placed it higher on the page, but besides that I have not made any
modifications.

Basically, any item I assign a free item works well as far as listing to the customers that they would get a free item.  But, the free item does not get added to the cart, with the regular item.

I cannot find, in the code, where the free item gets added to the cart at a 0.00 value.

here is an example of a product with a free item assigned to it.

http://www.fatbeats.com/catalog/product_in...roducts_id=4014

can anyone help me?


Here is my modified code in product_info.php

// start Get 1 Free
    // Display promotional text if this product qualifies for free product(s)
    $get_1_free_query = tep_db_query("select pd.products_name,
     m.manufacturers_name,
     p. products_id,
                                             g1f.products_free_quantity,                                            
                                             g1f.products_qualify_quantity
                                      from " . TABLE_GET_1_FREE . " g1f,
                                           " . TABLE_MANUFACTURERS . " m,
                                           " . TABLE_PRODUCTS . " p,
   " . TABLE_PRODUCTS_DESCRIPTION . " pd
                                      where g1f.products_id = '" . (int)$product_info['products_id'] . "'
                                      and pd.products_id = p.products_id
  and m.manufacturers_id = p.manufacturers_id                                    
and pd.products_id = g1f. products_free_id
                                        and pd.language_id = '" . (int)$languages_id . "'
                                        and status = '1'"
                                    );
    if (tep_db_num_rows($get_1_free_query) > 0) {
      $free_product = tep_db_fetch_array($get_1_free_query);
      echo '<p>' . sprintf (TEXT_GET_1_FREE_PROMOTION, $free_product['products_qualify_quantity'], $product_info['products_name'], $free_product['products_free_quantity'], $free_product['manufacturers_name'], $free_product['products_name']) . '</p>';
    }
// end Get 1 Free

#58   thepw

thepw
  • Members
  • 38 posts
  • Real Name:Paul

Posted 03 July 2007 - 04:17 PM

Hi there, I have installed this contribution on a fresh install of OScommerce and whenever I add the main product and "free" product into the cart, the free product has the normal price assigned and this is carried into the checkout.

Have I missed something?

Paul

#59   Arkadiy

Arkadiy
  • Members
  • 1 posts
  • Real Name:Arkady

Posted 25 July 2007 - 04:11 PM

I've the same problem as indicated in post #49

Please help me resolve it.

#60   offordscott

offordscott
  • Members
  • 19 posts
  • Real Name:Scott Offord

Posted 19 August 2007 - 06:01 PM

I need to be able to add the "buy # of this product, get 1 free" message in the category view, and not the individual product view.  Is there a quick way to add the message to each product row when viewing an entire category?