Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Choice of Free Gifts Module


sunrise99

Recommended Posts

pull_down_menu of Free Gift Choice have a lot of extra spaces in the drop down list if Languages selection from admin is more than 1, example - english....

 

Hope this can been fixed on next version.

Edited by sunrise99
Link to comment
Share on other sites

  • 1 month later...

Hey guys,

 

I think this is a great contribution, loving it, thanks goes out the author of the contribution. :)

Some problems and questions arise in my store though:

-the product name of the free gifts are displayed twice in the drop down menu.

-Is there a way to turn this mod on/of from within the Admin side of the shop?

-I made an extra category "Freebees" but if a free gift is choosen and the product/gift goes out of stock, it does not become inactive.

How do I make free gift products become inactive when they go out of stock?

 

I'm trying to figure it out by myself, but just thought I'd ask here also...

Link to comment
Share on other sites

  • 3 months later...

Hello,

 

Great contrib.

 

I fixed the problem of 'products displayed twice' in the dropdown menu. It's because if your store is in more than 1 language, the query searches for the categorie_name in each language. You have to lock the content of the dropdown menu by the language currently used (if you've still got the problem, tell me and I'll post the code).

 

I have a problem when, after selecting a gift in the dropdown menu, the Update button doesn't update the cart with the gift (it doesn't add the gift to the cart).

 

Have you got this same problem ? Dis you find a solution ?

 

Regards

 

Patrick

Link to comment
Share on other sites

  • 2 weeks later...
Hello,

 

Great contrib.

 

I fixed the problem of 'products displayed twice' in the dropdown menu. It's because if your store is in more than 1 language, the query searches for the categorie_name in each language. You have to lock the content of the dropdown menu by the language currently used (if you've still got the problem, tell me and I'll post the code).

 

I have a problem when, after selecting a gift in the dropdown menu, the Update button doesn't update the cart with the gift (it doesn't add the gift to the cart).

 

Have you got this same problem ? Dis you find a solution ?

 

Regards

 

Patrick

How can this module work in conjunction with AJAX Shopping Cart Contribution?

http://addons.oscommerce.com/info/4720

Link to comment
Share on other sites

  • 4 weeks later...

I always want a gift mod. Thank you!

 

Is that possible it is set so it allows multiple gift depending on value in shopping cart? e.g., $50 get to choose a gift in one specific gift category; $100 then add another category of gifts to the selection... (so people who spend $100 will be able to choose gift from both categories)... and admin can set the levels at backend.

Link to comment
Share on other sites

  • 1 month later...
Hello,

 

Great contrib.

 

I fixed the problem of 'products displayed twice' in the dropdown menu. It's because if your store is in more than 1 language, the query searches for the categorie_name in each language. You have to lock the content of the dropdown menu by the language currently used (if you've still got the problem, tell me and I'll post the code).

 

I have a problem when, after selecting a gift in the dropdown menu, the Update button doesn't update the cart with the gift (it doesn't add the gift to the cart).

 

Have you got this same problem ? Dis you find a solution ?

 

Regards

 

Patrick

 

Hi Patrick,

 

would be nice if you could post the code regarding the language.

 

Thanks.

Link to comment
Share on other sites

Excellent contribution to OSC I have it almost working only thing is when you need to update cart the update cart standard button dosnt work but the GIFT BOX where it sez please update to confirm your order does update the cart is there a fix for this?

 

what file controls this Please click to confirm your selection? id like to change the wording

 

Thank You

Link to comment
Share on other sites

Hi, this looks like it might do what I need but I am not sure . .

 

I have thousands of products and am looking for something where the customer can get 2 free products from the same category when buying 3. In this case they are stickers . .when someone buys 3 products from one of the stickers category I want to offer them the choice of 2 more from the smae category for free. I would also like to offer 5 free when buying 5 so if anyone can advise me if this is the contrib for me i will get to installing it.

 

Hope someone can post to let me know.

 

Many thanks,

Binkys.. http://www.binkycrafts.com/shop

Tony

Link to comment
Share on other sites

Hello the problem i am having is with the database changes. These 2 lines of instructions

NSERT INTO `configuration` VALUES ('ID', 'Minimum Spend', 'FREE_GIFT_MINIMUM_SPEND', '30.00', 'Minimum Spend to Qualify For The Free Gift', '17', '1', '2007-08-08 15:24:50', '2007-08-07 19:16:00', null, null);

 

INSERT INTO `configuration` VALUES ('ID', 'Free Gift Category', 'FREE_GIFT_CATEGORY', '96', 'The category that contains all of the potentially free both give me this error

#1136 - Column count doesn't match value count at row 1

Now in configuration i have 14 columns so am i to assume i change the 17 to 14 and insert the id number?

thanks trish

Link to comment
Share on other sites

Update: It works with rc2a, and I have a heavily modified shop the install was a breeze! I hope someone can figure out the gift levels as it would be nice to offer different gifts for different totals.

Link to comment
Share on other sites

  • 3 months later...

Love the contribution ..... however, I have a question/request to help it to serve my purpose better. I want to be able to give free product with the purchase of a specific item, regardless of the cart amount. Example:

 

Customer buys 1 - Widget ..... and then can select from a selection of free items.

 

I have a few items I want to be able to give away with purchase of a specific item, but I also want to offer the "free" items for sale as well. I could do this manually using order editor, but I'd like it to be automated. Any help or ideas?

Link to comment
Share on other sites

  • 2 months later...

Hi there! I just added this contribution, and am sure my customers will love it! I have two simple questions.

1. is there a way to add the free gift to the invoice?

2. How the heck to do underline the "update" so my customers know to click it there?

Link to comment
Share on other sites

Hi there! I just added this contribution, and am sure my customers will love it! I have two simple questions.

1. is there a way to add the free gift to the invoice?

2. How the heck to do underline the "update" so my customers know to click it there?

 

In admin/invoice.php I used

<?php
/*** // Begin Free Gift Modification ***/
?>      
     <tr>
       <td class="main"><b><?php echo TEXT_FREE_GIFT; ?></b></td>
       <td class="main"><?php
           $freegift_query =  tep_db_query("select products_name, products_model from orders_freegift where orders_id = '" .$HTTP_GET_VARS['oID']  . "'");
					$freegift = tep_db_fetch_array($freegift_query);
					echo $freegift['products_model'] . " - " . $freegift['products_name']; ?></td>
     </tr>

 

added after

<tr>
       <td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td>
       <td class="main"><?php echo $order->info['payment_method']; ?></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>

 

 

In shoppingcart.php I use this

$info_box_contents[1][] = array('align' => 'center',
                                             'params' => 'class="productListing-data" valign="top"',
                                             'text' => '<b>Free Gift Choice: </b>' . tep_draw_pull_down_menu('freegift_id', $freegifts_array, $cart->get_freegift()) .  '<br><br><font color="Red">Please click ' .
														tep_draw_form('freegift', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')) . tep_image_submit('button_choose_gift.gif', IMAGE_BUTTON_UPDATE_FREEGIFT) . '
														</form>' .	' to confirm your selection</font>');

 

it uses a button instead of the text

here's what it looks like

 

hope this is helps.

Link to comment
Share on other sites

  • 2 weeks later...

Im a little confused with the install instructions with this mod. I hope someone can clear up this confusion. The install states

 

Installation:

 

New files:

 

/admin/includes/modules/order_total/ot_freegift.php

/admin/includes/languages/english/modules/order_total/ot_freegift.php

 

when I open the archive the file mentioned above are located in

 

Installation:

 

/includes/modules/order_total/ot_freegift.php

/includes/languages/english/modules/order_total/ot_freegift.php

 

Im assuming they belong in the location that is shown in the in the archive and not in the admin. Can someone confirm this? Thank you.

Link to comment
Share on other sites

Im a little confused with the install instructions with this mod. I hope someone can clear up this confusion. The install states

 

Installation:

 

 

 

when I open the archive the file mentioned above are located in

 

Installation:

 

 

 

Im assuming they belong in the location that is shown in the in the archive and not in the admin. Can someone confirm this? Thank you.

 

I believe you are right. I've had the same questions, and have actually uninstalled just

now everything out of admin, leaving only those two files into the /includes, and things

are working just fine as far as seeing it in the admin control panel and being able to

change the settings.

Link to comment
Share on other sites

  • 1 month later...
Excellent contribution to OSC I have it almost working only thing is when you need to update cart the update cart standard button dosnt work but the GIFT BOX where it sez please update to confirm your order does update the cart is there a fix for this?

OK, I know it is a very old question, but the bug still seems present in the latest versions.

To fix this remove the "</form>" from the added code in catalog/shopping_cart.php.

Link to comment
Share on other sites

  • 1 month later...
I always want a gift mod. Thank you!

 

Is that possible it is set so it allows multiple gift depending on value in shopping cart? e.g., $50 get to choose a gift in one specific gift category; $100 then add another category of gifts to the selection... (so people who spend $100 will be able to choose gift from both categories)... and admin can set the levels at backend.

 

 

 

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...

Edited by Aperol
Link to comment
Share on other sites

  • 1 month later...

This seems like a great contribution, and I am planning to install. I had some trouble installing v.1 last night though and it seems like v.2 has some nice features.

 

Do I need to install v.1 and have it working, then add the extra files from v.2? Seems like the install should be pretty straight forward, but I couldn't get it working at first. Thanks for any help.

Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...

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

Link to comment
Share on other sites

  • 5 months later...

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 . "'");

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...