Get 1 Free
#81
Posted 09 November 2007, 18:14
Any ideas?
TVA Intracomm
Numbers of visitors online
Who's online Enhancement
....
#82
Posted 09 November 2007, 18:25
kymation, on Nov 9 2007, 12:06 PM, said:
Regards
Jim
#83
Posted 09 November 2007, 18:48
kymation, on Nov 9 2007, 06:47 PM, said:
Regards
Jim
no way i can pass that error
phpmyadmin 2.6.1
mysql 3.23
#84
Posted 10 November 2007, 00:33
gregy, on Nov 9 2007, 11:48 AM, said:
phpmyadmin 2.6.1
mysql 3.23
Regards
Jim
Banners Box 2.3.1 Support
Categories Accordion Box 2.3.1 Support
Categories Images Box 2.2x 2.3.1 Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.1 Support
Get 1 Free 2.2x Support
Include HTML and Text Boxes 2.2x
jQuery Banner Rotator 2.2x 2.3.1 Support
Modular Front Page 2.3.1 Support
Modular SEO Header Tags 2.3.1 Support
More Pics 2.2x Support
MVS 2.2x Support
osC Catalog 2.2x Support
PDF Datasheet 2.3.1 Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.1 Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.1 Support
Similar Products Box 2.2x
Theme Switcher 2.3.1 Support
#85
Posted 11 November 2007, 14:47
My purpose is just to answer to my clients who don't understand why the don't have the ratio of the free product ordered, as the logical: for example I order 2 I get 1 free, I order 4, I get 2 free, etc. There is a ratio thing. For the moment if they order 2, 3, 4 or more they get only 1. They don't understand.
So I am trying to respect your code as "buy x get y free", but if you order 3 x, you wil get 3 more free products...
I have made the following changes:
$output = array ( 'id' => $get_1_free['products_free_id'], //'quantity' => $free_quantity, 'quantity' => floor($products_quantity*($get_1_free['products_free_quantity']/$get_1_free['products_qualify_quantity'])), 'name' => $products_free['products_name'], 'model' => $products_free['products_model'], 'image' => $products_free['products_image'], //'weight' => $products_free['products_weight'] 'weight' => $products_free['products_weight']*floor($products_quantity*($get_1_free['products_free_quantity']/$get_1_free['products_qualify_quantity'])) );It's working, except for one thing. when you do an update of the quantity on the products qualified for the free product, a new free product with its normal price is added to the cart, and I don't know how to correct this.
This code take the entire part of the ration with the setup made in the Get 1 free admin. With the ability to have:
buy 1 get 0 free,
buy 2 get 1 free (the ratio),
buy 3 get 1 free,
buy 4 get 2 free (a multiple of the ratio [qty*(qty free/Qty qualified)],
etc...
Am I wrong or not? We just have to find how to correct the resulting bug.
TVA Intracomm
Numbers of visitors online
Who's online Enhancement
....
#86
Posted 11 November 2007, 18:20
The update bug is well known. Unfortunately I don't have a fix that doesn't involve rewriting most of this contribution. My regular work has been keeping me too busy to do more than plan out this major revision.
Regards
Jim
Banners Box 2.3.1 Support
Categories Accordion Box 2.3.1 Support
Categories Images Box 2.2x 2.3.1 Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.1 Support
Get 1 Free 2.2x Support
Include HTML and Text Boxes 2.2x
jQuery Banner Rotator 2.2x 2.3.1 Support
Modular Front Page 2.3.1 Support
Modular SEO Header Tags 2.3.1 Support
More Pics 2.2x Support
MVS 2.2x Support
osC Catalog 2.2x Support
PDF Datasheet 2.3.1 Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.1 Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.1 Support
Similar Products Box 2.2x
Theme Switcher 2.3.1 Support
#87
Posted 13 November 2007, 02:04
Can you clarify the feature set on your mod for me?
I have a client who sells greeting cards, and his goal is Buy any 5 cards get 1 free. Can it work for buy X number of any of the selected products? or is it only buy x # of this item get 1 free.
Furthermore is it possible to give the customer a choice of the free product?
Thanks!
#88
Posted 13 November 2007, 03:38
Jesse J, on Nov 12 2007, 07:04 PM, said:
Can you clarify the feature set on your mod for me?
I have a client who sells greeting cards, and his goal is Buy any 5 cards get 1 free. Can it work for buy X number of any of the selected products? or is it only buy x # of this item get 1 free.
Furthermore is it possible to give the customer a choice of the free product?
Thanks!
Regards
Jim
Banners Box 2.3.1 Support
Categories Accordion Box 2.3.1 Support
Categories Images Box 2.2x 2.3.1 Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.1 Support
Get 1 Free 2.2x Support
Include HTML and Text Boxes 2.2x
jQuery Banner Rotator 2.2x 2.3.1 Support
Modular Front Page 2.3.1 Support
Modular SEO Header Tags 2.3.1 Support
More Pics 2.2x Support
MVS 2.2x Support
osC Catalog 2.2x Support
PDF Datasheet 2.3.1 Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.1 Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.1 Support
Similar Products Box 2.2x
Theme Switcher 2.3.1 Support
#89
Posted 13 November 2007, 07:54
Product: Anneau Quantity to Qualify: 2 Maximum Free Products: 100 Free Product: Anneau 2 Free Product Quantity: 1 Expiry Date: Calendar
The dream
TVA Intracomm
Numbers of visitors online
Who's online Enhancement
....
#90
Posted 13 November 2007, 16:00
#91
Posted 13 November 2007, 16:42
thedream, on Nov 13 2007, 12:54 AM, said:
Product: Anneau Quantity to Qualify: 2 Maximum Free Products: 100 Free Product: Anneau 2 Free Product Quantity: 1 Expiry Date: Calendar
The dream
Regards
Jim
Banners Box 2.3.1 Support
Categories Accordion Box 2.3.1 Support
Categories Images Box 2.2x 2.3.1 Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.1 Support
Get 1 Free 2.2x Support
Include HTML and Text Boxes 2.2x
jQuery Banner Rotator 2.2x 2.3.1 Support
Modular Front Page 2.3.1 Support
Modular SEO Header Tags 2.3.1 Support
More Pics 2.2x Support
MVS 2.2x Support
osC Catalog 2.2x Support
PDF Datasheet 2.3.1 Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.1 Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.1 Support
Similar Products Box 2.2x
Theme Switcher 2.3.1 Support
#92
Posted 14 November 2007, 08:11
can you tell me please which version to install?
Actually i dont know what version will work in the way it should so maybe a hint of the inventor woul be nice for me to find out.
Thank you very much.
Michael
#93
Posted 14 November 2007, 17:48
someone_else, on Nov 14 2007, 01:11 AM, said:
can you tell me please which version to install?
Actually i dont know what version will work in the way it should so maybe a hint of the inventor woul be nice for me to find out.
Thank you very much.
Michael
Regards
Jim
Banners Box 2.3.1 Support
Categories Accordion Box 2.3.1 Support
Categories Images Box 2.2x 2.3.1 Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.1 Support
Get 1 Free 2.2x Support
Include HTML and Text Boxes 2.2x
jQuery Banner Rotator 2.2x 2.3.1 Support
Modular Front Page 2.3.1 Support
Modular SEO Header Tags 2.3.1 Support
More Pics 2.2x Support
MVS 2.2x Support
osC Catalog 2.2x Support
PDF Datasheet 2.3.1 Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.1 Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.1 Support
Similar Products Box 2.2x
Theme Switcher 2.3.1 Support
#94
Posted 19 November 2007, 11:40
kymation, on Nov 14 2007, 08:48 PM, said:
Regards
Jim
Hello!
Regarding this bug, I've notes it that when the free products's products_status = 0 then it works well. It doesn't exists a 'quick fix' for this problem, only the whole rewriting? I assume that when updating the shopping cart, there is a check for products_status. At that point could be a check as well if it's a free product (let's say that put an extra info to the shopping cart product, to know that it's about a free product).
Thx.
#95
Posted 19 November 2007, 13:11
kymation, on Mar 31 2007, 06:02 AM, said:
Regards
Jim
Hi there!
Here's a quick fix for the "added again the free product but with full price" problem:
There are small modification in 3 files, highlited in red.
classes/shopping_cart.php, function get_products()
// Get 1 free
if (is_array ($free_product = $this->get1free ($products_id))) {
// Add the free product to the shopping cart (Customer cannot alter this)
$products_array[] = array('id' => $free_product['id'],
'name' => $free_product['name'],
'model' => $free_product['model'],
'image' => $free_product['image'],
'price' => 0,
'quantity' => $free_product['quantity'],
'weight' => $free_product['weight'],
'final_price' => 0,
'tax_class_id' => $products['products_tax_class_id'],
'attributes' => '',
'free' => 1
);
} //if (is_array
// end Get 1 free
--------------------------------------------------------------------------------------------------
shopping_cart.php
$info_box_contents[$cur_row][] = array('params' => 'class="productListing-data"',
'text' => $products_name);
$info_box_contents[$cur_row][] = array('align' => 'center',
'params' => 'class="productListing-data" valign="top"',
'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']) . tep_draw_hidden_field('free[]', $products[$i]['free']) );
$info_box_contents[$cur_row][] = array('align' => 'right',
'params' => 'class="productListing-data" valign="top"',
'text' => '<b>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>');
}
new productListingBox($info_box_contents);
--------------------------------------------------------------------------------------------------
application_top.php, case 'update_product' section:
$isFree = $HTTP_POST_VARS['free'][$i];
if ($isFree != 1)
{
$cart->add_cart($HTTP_POST_VARS['products_id'][$i], $HTTP_POST_VARS['cart_quantity'][$i], $attributes, false);
}
That's it, it works for me.
#96
Posted 21 November 2007, 03:01
atti, on Nov 19 2007, 06:11 AM, said:
Here's a quick fix for the "added again the free product but with full price" problem:
<code snipped>
That's it, it works for me.
Now I just need to package up all of the fixes everyone has contributed and put out a new release. If anyone knows of more bugs, now would be a great time to speak up.
Regards
Jim
Banners Box 2.3.1 Support
Categories Accordion Box 2.3.1 Support
Categories Images Box 2.2x 2.3.1 Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.1 Support
Get 1 Free 2.2x Support
Include HTML and Text Boxes 2.2x
jQuery Banner Rotator 2.2x 2.3.1 Support
Modular Front Page 2.3.1 Support
Modular SEO Header Tags 2.3.1 Support
More Pics 2.2x Support
MVS 2.2x Support
osC Catalog 2.2x Support
PDF Datasheet 2.3.1 Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.1 Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.1 Support
Similar Products Box 2.2x
Theme Switcher 2.3.1 Support
#97
Posted 22 November 2007, 15:09
why do i get this error on product_info : Warning: sprintf() [function.sprintf]: Too few arguments
would appreciate the help
#98
Posted 22 November 2007, 17:51
donkassim, on Nov 22 2007, 08:09 AM, said:
why do i get this error on product_info : Warning: sprintf() [function.sprintf]: Too few arguments
would appreciate the help
Regards
Jim
Banners Box 2.3.1 Support
Categories Accordion Box 2.3.1 Support
Categories Images Box 2.2x 2.3.1 Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.1 Support
Get 1 Free 2.2x Support
Include HTML and Text Boxes 2.2x
jQuery Banner Rotator 2.2x 2.3.1 Support
Modular Front Page 2.3.1 Support
Modular SEO Header Tags 2.3.1 Support
More Pics 2.2x Support
MVS 2.2x Support
osC Catalog 2.2x Support
PDF Datasheet 2.3.1 Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.1 Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.1 Support
Similar Products Box 2.2x
Theme Switcher 2.3.1 Support
#99
Posted 22 November 2007, 21:43
As always, please post here if you find any bugs or if you have problems installing this.
Regards
Jim
Banners Box 2.3.1 Support
Categories Accordion Box 2.3.1 Support
Categories Images Box 2.2x 2.3.1 Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.1 Support
Get 1 Free 2.2x Support
Include HTML and Text Boxes 2.2x
jQuery Banner Rotator 2.2x 2.3.1 Support
Modular Front Page 2.3.1 Support
Modular SEO Header Tags 2.3.1 Support
More Pics 2.2x Support
MVS 2.2x Support
osC Catalog 2.2x Support
PDF Datasheet 2.3.1 Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.1 Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.1 Support
Similar Products Box 2.2x
Theme Switcher 2.3.1 Support
#100
Posted 23 November 2007, 17:07
I like the idea of your Add-On. However, when I tried to manually install the add-on it went wrong and did not work, so I reverted to a previously saved version of my site. However, when I reverted the changed files, I get the following error message where the application_bottom.php file should be displayed...any suggestions from anyone would be much appreciated.
1146 - Table 'toptoners.TABLE_COUNTER' doesn't exist
select startdate, counter from TABLE_COUNTER
[TEP STOP]
Thank you.
Mark
Edited by Jan Zonjee, 27 November 2007, 21:51.














