Jump to content
thejungle

Dangling Carrot (Free Gift/Discount Contrib)

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?

Share this post


Link to post
Share on other sites

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? :(

Share this post


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

Share this post


Link to post
Share on other sites

:'( I found out my silly careless mistake. I uploaded to store 1 but checked on store 2. Gosh...

 

Now, I've everything running fine but the delete, update and edit functions are not working. :huh:

Share this post


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

Share this post


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

Share this post


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

Share this post


Link to post
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.

Share this post


Link to post
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 ;)

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


Link to post
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?

 

 

can anyone help me with this one?


Thanks!

Clesha

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites
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?

 

Carlos I never received a response to my post so I gave up for now.

 

Does anyone have a solution for this?


Thanks!

Clesha

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


Link to post
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 ;)

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

×