Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Dangling Carrot (Free Gift/Discount Contrib)


thejungle

Recommended Posts

I've installed this contribution on a clean MS 2.2 and there isn't any option under admin panel to add gifts. I've downloaded the latest version two. There are only two php files included. gift.php and gift_add.php.. am I right? Did I miss out any files? Please advise.. thanks!!

 

PHP Files included in the package I downloaded:

 

catalog>includes>boxes>gifts.php

admin>gift_add.php

 

Steps for installation:

1. upload the sql file to the database

2. overwrite all files to the clean MS

3. edit shopping_cart.php

3) include the following to catalog/includes/languages/english.php

// dangling carrot v1.9 in includes/boxes/gifts/php

define('BOX_HEADING_GIFTS', 'Special Gifts');.

 

what else I miss?

Link to comment
Share on other sites

  • Replies 308
  • Created
  • Last Reply

Top Posters In This Topic

Thanks Jack,

 

I re-downloaded the contribution and now I got it re-installed following the steps I missed previously. I'm able to see 'Gifts' under Admin>Catalog.

 

There is an empty box besides the word 'treshold' and a pull down menu with empty elements and an add button. Have I installed it correctly? Have I missed out any steps again? I followed the instruction closely step by step.. 10 steps. yes.

 

I can't figure out how it supposed to work. Add gift from admin>catalog>Gifts

 

Key in the dollars amount, clicked Add. Is that all? And what's the treshold for and how do I assigned which product to be included as a gift? I mean... the only new thing that appears in the admin panel is the Admin>Catalog>Gifts Did I install it incorrectly again? :(

Link to comment
Share on other sites

Am I doing it correctly?

 

1. Admin>Catalog>Categories/Products

 

- Assigned a product as a carrot by ticking the check box

 

2. Admin>Catalog>Gifts

 

- there is only an input box before the word 'treshold' + an empty pull down menu + an add button.

 

I'm stuck here. What do I do from here? I tried adding some digits at the input box and the pull down menu is still emptied.

 

I've double checked, triple checked and triple checked again but I can't find what I am missing from the installation guidelines. Every files are uploaded accordingly.

 

Anyone encountered the same situation can offer some help? Thanks

Link to comment
Share on other sites

Oh, I found the code by happybear to fix this. I've uploaded the updated package with the new gift_add.php fixed to the contribution area for easier d/l for other users.

 

Thanks for this contribution and it is working great!

Edited by tuppergirl
Link to comment
Share on other sites

  • 4 weeks later...

Hi,

 

I've installed the lastest version plus fixes of Dangling Carrot and it's all working great apart from one small thing ...

 

If the threshold is set to $30 and I add a product to my cart costing $29.99 then all is OK, it tells me that I need to spend an extra $0.01 as it should do.

 

If I add a product that costs more than $30 then again, all is OK - an add to cart button appears and the item is added to the cart if the user chooses to.

 

BUT ... if an item costing exactly $30 is added, the add to cart button appears, but clicking on it doesn't add anything to the cart.

 

Anyone else got the same problem?

 

Thanks,

Ali

Link to comment
Share on other sites

Hi,

 

I've installed the lastest version plus fixes of Dangling Carrot and it's all working great apart from one small thing ...

 

If the threshold is set to $30 and I add a product to my cart costing $29.99 then all is OK, it tells me that I need to spend an extra $0.01 as it should do.

 

If I add a product that costs more than $30 then again, all is OK - an add to cart button appears and the item is added to the cart if the user chooses to.

 

BUT ... if an item costing exactly $30 is added, the add to cart button appears, but clicking on it doesn't add anything to the cart.

 

Anyone else got the same problem?

 

Thanks,

Ali

You can just adjust the threshold to be 1 cent or whatever less and it will work fine

Link to comment
Share on other sites

You can just adjust the threshold to be 1 cent or whatever less and it will work fine

 

No, that still wouldn't work - if the threshold was set to $29.99 then the problem would be the same ...

 

Having spent $29.98 the customer would be told they need to spend $0.01

 

If they spent $29.99 they would be shown the add to cart button which wouldn't work until they'd spent $30.

 

Thanks for the potential solution, but it just shifts the problem ;)

 

Ali.

Link to comment
Share on other sites

No, that still wouldn't work - if the threshold was set to $29.99 then the problem would be the same ...

 

Having spent $29.98 the customer would be told they need to spend $0.01

 

If they spent $29.99 they would be shown the add to cart button which wouldn't work until they'd spent $30.

 

Thanks for the potential solution, but it just shifts the problem ;)

 

Ali.

 

Ali, I think your logic and reasoning are wrong.

You mentioned a figure of $30 in your example not $29.99.

So therefor when the customer has spent $30 they have broken the threshold and everything works fine which is the problem you are reporting.

 

If you need a threshold of $29.99 you just put $29.98 ad infenitum.

Try it and see ;)

Link to comment
Share on other sites

Hi Jack.

 

I just installed the mod and got this error when I try to edit a product:

 

Warning: reset(): Passed variable is not an array or object in /home/xxx/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /home/xxx/admin/includes/classes/object_info.php on line 18

 

I checked the thread and read the solution for uploading a fresh catergory file, but my file is mod with the header tags. Is there another way to fix this?

Thanks!

Clesha

Link to comment
Share on other sites

I think an error was made in the installation. Try going back over the installation and doubleshcek everything. The error you are getting is indicating a problem that shouldn't be showing up. There might be some code missing.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I think an error was made in the installation. Try going back over the  installation and doubleshcek everything. The error you are getting is indicating a problem that shouldn't be showing up. There might be some code missing.

 

Jack

 

 

Jack -

 

I just reinstalled the mod and I'm getting the same error message. I installed 2.0 the 1st time and 2.0a this time. Where do I go from here?

Thanks!

Clesha

Link to comment
Share on other sites

Since your problem is in the admin section, the problem is most likely the categories file. Post it here and I will load it into mine to see if I get the same error.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Jack -

 

I just reinstalled the mod and I'm getting the same error message.  I installed 2.0 the 1st time and 2.0a this time.  Where do I go from here?

 

 

I did noticed that the header tag mod & this mod share one block of code in the admin > CATERGORIES file.

 

This is their's:

 

//HTC BOC 
  if (isset ($HTTP_GET_VARS['pID']) && (!$HTTP_POST_VARS) ) {
     $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_carrot, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");
  //HTC EOC

 

 

And yours:

 

if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) {
     //--BOF dangling carrot v2.0--
     $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_carrot, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");
     //--EOF dangling carrot v2.0--

Thanks!

Clesha

Link to comment
Share on other sites

Ok, I finally got the mod to work, but only if the product was set to active, which meant it would show up in the catalog. I read through this thread again and saw this same common problem with no solution so I decided to install hide prices for SPPC.

 

I hid the test product from everyone and it did come up in the cart when I was over the $50 threshold. Now, when I hit the add now button, it bounces me to the index page instead of the shopping cart.

 

Has anyone figured out a way to set the products as 'inactive' and still show up in the shopping cart when the threshold is met?

Thanks!

Clesha

Link to comment
Share on other sites

  • 2 weeks later...
Ok, I finally got the mod to work, but only if the product was set to active, which meant it would show up in the catalog. I read through this thread again and saw this same common problem with no solution so I decided to install hide prices for SPPC.

 

I hid the test product from everyone and it did come up in the cart when I was over the $50 threshold. Now, when I hit the add now button, it bounces me to the index page instead of the shopping cart.

 

Has anyone figured out a way to set the products as 'inactive' and still show up in the shopping cart when the threshold is met?

 

 

can anyone help me with this one?

Thanks!

Clesha

Link to comment
Share on other sites

Ok, I finally got the mod to work, but only if the product was set to active, which meant it would show up in the catalog. I read through this thread again and saw this same common problem with no solution so I decided to install hide prices for SPPC.

 

I hid the test product from everyone and it did come up in the cart when I was over the $50 threshold. Now, when I hit the add now button, it bounces me to the index page instead of the shopping cart.

 

Has anyone figured out a way to set the products as 'inactive' and still show up in the shopping cart when the threshold is met?

how did you hide the product so it doesnt show on the catalog? also, do you know if you can order more than one gift for the threshold?

Link to comment
Share on other sites

Howdy Clesha

 

If you read through this topic, you will find a solution here:

 

open shopping_cart.php

 

in the query:

$gift_query = tep_db_query("SELECT fg.*, p.products_id, p.products_model, p.products_price, p.products_image, p.products_status, pd.products_name FROM free_gifts fg, products p

LEFT JOIN products_description pd ON (pd.products_id=fg.products_id)

WHERE pd.language_id = '".$languages_id."' AND p.products_id = fg.products_id AND p.products_status = '1' ORDER BY fg.threshold ASC");

 

remove this:

AND p.products_status = '1'

 

now you should be able to use gifts set as inactive items.

 

Kevin

 

If you do this, you can then mark an item out-of-stock but keep product quantity set to the number you have in stock. It will not show up in your catalog; however, you can use it as a gift. Easy. :rolleyes:

 

Best Regards, Ted

www.barefootted.com

Link to comment
Share on other sites

Howdy Folks

 

I have added this contribution, and seem to have it working. I am using it on a heavily modified CRE 6.15.

 

I am having one issue:

 

In Cart Contents, down below the items added to the cart, the Carrot items display. However, my carrot items do not have an add to cart button. :o Why? :huh:

 

I noticed that on Chris' site, www.session1.com, there are add to cart buttons next to the gift items.

 

Also, as far as feature requests go, it would be GREAT if...

 

1. Customers could add more than one gift. :lol:

 

Is it possible?

 

Best Regards, Ted

Link to comment
Share on other sites

I want to offer $off coupons to certain groups - teams etc.

 

We could give them the coupon # to type in.

 

Will this contribution work for this ?

 

thanks

 

Donna :D

 

 

Donna -

 

I think you would need to use the credit/gift voucher contrib for that.

Thanks!

Clesha

Link to comment
Share on other sites

Listen, Kids, I really have a simple question here that will only take a brief moment to answer:

 

Howdy Folks

 

I have added this contribution, and seem to have it working. I am using it on a heavily modified CRE 6.15.

 

I am having one issue:

 

In Cart Contents, down below the items added to the cart, the Carrot items display. However, my carrot items do not have an add to cart button. :o Why? :huh:

 

I noticed that on Chris' site, www.session1.com, there are add to cart buttons next to the gift items.

 

In a nutshell, is there supposed to be an add to cart button?

 

Now that's not so difficult to answer, is it? :rolleyes:

 

Best Regards, Ted

Link to comment
Share on other sites

Listen, Kids, I really have a simple question here that will only take a brief moment to answer:

In a nutshell, is there supposed to be an add to cart button?

 

Now that's not so difficult to answer, is it? :rolleyes:

 

Best Regards, Ted

 

In a nutshell, you have already answered your own question "I noticed that on Chris' site, www.session1.com, there are add to cart buttons next to the gift items."

 

Yes there should ;)

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