Jump to content
sunrise99

Choice of Free Gifts Module

Recommended Posts

For the language issue I made the following update in shopping_cart.php

 

original code:

// Display Dropdown box full of products in free gifts category
					$freegifts_query = tep_db_query("SELECT p.products_id, pd.products_name FROM " . TABLE_PRODUCTS . " p Inner Join " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc ON p.products_id = ptc.products_id Inner Join " . TABLE_PRODUCTS_DESCRIPTION . " pd ON p.products_id = pd.products_id WHERE ptc.categories_id =  '". MODULE_FREEGIFT_CATEGORY . "'");

 

new code:

// Display Dropdown box full of products in free gifts category
					$freegifts_query = tep_db_query("SELECT p.products_id, pd.products_name FROM " . TABLE_PRODUCTS . " p Inner Join " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc ON p.products_id = ptc.products_id Inner Join " . TABLE_PRODUCTS_DESCRIPTION . " pd ON p.products_id = pd.products_id WHERE ptc.categories_id =  '". MODULE_FREEGIFT_CATEGORY . "' and pd.language_id = '" . (int)$languages_id . "'");

 

 

 

Thanks for this fix

 

 

I modified the query (added and p.products_status=1) to exclude all disabled products (this query include the language fix too) :

 

$freegifts_query = tep_db_query("SELECT p.products_id, pd.products_name FROM " . TABLE_PRODUCTS . " p Inner Join " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc ON p.products_id = ptc.products_id Inner Join " . TABLE_PRODUCTS_DESCRIPTION . " pd ON p.products_id = pd.products_id WHERE ptc.categories_id =  '". MODULE_FREEGIFT_CATEGORY . "' and p.products_status=1 and pd.language_id = '" . (int)$languages_id . "'");

 

 

Thanks all :thumbsup:


///

Share this post


Link to post
Share on other sites

yep

any news about it? i need it too...

 

i have to make something like this: over 20+ euro a gift , over 50+ euro a different gift , over 100+ euro an other different gift...

 

 

also,

i tried to install it on my osCommerce Online Merchant v2.2 RC2a , but i got an error in the shopping cart at line 404...

you got to put several different gifts with purchase amount? if not achieved with this contributionthat you use? I would be very helpful thanks

Share this post


Link to post
Share on other sites

Wandering if someone can let me know whether this is possible with this module:

 

1) Spend $10 get XXX free

2) Spend $20 get YYY free

3) Spend $50 get ZZZ free

 

Based on the amount they spend, they get a different price, so no one feels left out, but the ones who spend more get a more valuable gift.

 

Thanks!

 

Ricardo

ricardo conseguiste hacer lo que querías? si usaste otra contribución me sería de gran ayuda quiero hacer lo mismo gracias!

you got to put several different gifts with purchase amount? if not achieved with this contributionthat you use? I would be very helpful thanks

Share this post


Link to post
Share on other sites

not much action on this tread lately, but perhaps some knows / has modified this to actually store the free gift in the orders_products table with 0 price ?

it would then automatically integrate with accounting and keep the stock levels up to date.


KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×