Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Choice of Free Gifts Module


sunrise99

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:

///

Link to comment
Share on other sites

  • 1 year later...

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

Link to comment
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

Link to comment
Share on other sites

  • 2 years later...

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...