Forums / All Other Contributions/Addons / Free Gifts-Dangling Carrot support

Free Gifts-Dangling Carrot support

Views: 48,602

Results 161 to 180 of 237
17 Feb 2010, 2:34 PM
#161
paul3648 avatar

paul3648

Zen Follower

Join Date:
Mar 2007
Location:
Taiwan
Posts:
239
Plugin Contributions:
0

Free Gifts-Dangling Carrot support

There is a new version of this mod in the download section which incorporates all the changes in this thread. One thing I've noticed is you need MySQL 5.x - it will not work with MySQL 4.x

18 Feb 2010, 12:01 AM
#162
sjmills93 avatar

sjmills93

New Zenner

Join Date:
Jan 2010
Location:
St. Joseph, Ontario, Canada
Posts:
37
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

I tried to install this module, but ran into difficulties and opted to uninstall. It would seem that although I did a "full backup" using my hosting companies Full Backup Wizard, the SQL database was not backed up. Live and learn. Live and learn.

Happily, because for every file being overwritten I kept the original file and just renamed it "bak", I could restore those files.

However, I don't know enough SQL commands to counter-act the SQL code provided in the instructions:

CREATE TABLE free_gifts (
gift_id tinyint(4) NOT NULL auto_increment,
threshold mediumint(9) NOT NULL default '0',
products_id mediumint(9) NOT NULL default '0',
PRIMARY KEY (gift_id)
) TYPE=MyISAM;

insert into configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values (1200, 'Gifts Image Width', 'GIFTS_IMAGE_WIDTH', '90', 'The pixel width of heading images', '4', '25', now(), now(), NULL, NULL);
insert into configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values (1201, 'Gifts Image Height', 'GIFTS_IMAGE_HEIGHT', '100', 'The pixel height of heading images', '4', '26', now(), now(), NULL, NULL);
ALTER TABLE products ADD products_carrot tinyint(1) default '0' AFTER products_status ;

Could someone please provide me with the SQL commands to remove this and its configurations?

I'm going to try this module on another site that is not so modified. So, I'll look forward to that.

The directions regarding the new table's name tripped me up. I didn't know how to find out what my SQL database prefix was until I generated the first error message. Then I tried to "drop" the table and ran into syntax errors.

Help would be greatly appreciated!:frusty:

PS - it turns out that my database name was "judy9328_zc1" and the error message I got said > TABLE 'judy9328_zc1.zen_free_gifts" doesn't exist and actually when I was clicking around cPanel, it seemed a table called 'judys9328_zc1.judy9328_zc1.zen_free_gifts" was actually created.

This is when I decided to bail on this module, as things were getting to complex for someone with no SQL and very, very little PHP knowledge.

Using 1.3.8a / MySQL 5.0.89 / PHP Version: 5.2.11 (Zend: 2.2.0)

17 Mar 2010, 1:27 AM
#163
bladerunner avatar

bladerunner

New Zenner

Join Date:
Mar 2010
Posts:
2
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

is there a way to get this mod to work with a free product with attributes? i couldn't figure out what i was doing wrong, then i got to page 12 or so of this thread and read that it wouldn't work with attributes turned on. every time i tried to add the free product to the cart, it would take me to that free product's product info page, and when you clicked "return to cart" it would simply take you back to the cart without adding the free product...
but if i remove the attributes, it'll pop up there fine.
unfortuanately, the free product i'm trying to offer is a download, and so i need to add an attribute...is there any other workarounds?

21 Mar 2010, 10:10 AM
#164
bunker0 avatar

bunker0

New Zenner

Join Date:
Mar 2010
Posts:
9
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

Hi All,

Great Contrib!!

Only one issue.. How to automaticly update includes/functions/sessions.php when new Gifts are created? Its a real pain having to manualy edit sessions.php every time I create a new gift...

Regards & thx in advanced.

25 Mar 2010, 1:58 AM
#165
neparker avatar

neparker

New Zenner

Join Date:
Apr 2009
Posts:
79
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

I have yet to install the new mod only because my store is all downloads only. We are wanting to have the same thing, be able to have the customer spend X amoutn of money and get the choosen product of that month added automatically to the cart, but like this post, it has to be downloaded as well. Is the new mod going to work with downloads and attributes?

bladerunner:

is there a way to get this mod to work with a free product with attributes? i couldn't figure out what i was doing wrong, then i got to page 12 or so of this thread and read that it wouldn't work with attributes turned on. every time i tried to add the free product to the cart, it would take me to that free product's product info page, and when you clicked "return to cart" it would simply take you back to the cart without adding the free product...
but if i remove the attributes, it'll pop up there fine.
unfortuanately, the free product i'm trying to offer is a download, and so i need to add an attribute...is there any other workarounds?

4 May 2010, 8:47 PM
#166
britishagent avatar

britishagent

New Zenner

Join Date:
Dec 2009
Posts:
7
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

Hello

I am having trouble understanding how to hide gifts but still make them able to be added to the cart. The mod itself works fine but if the gifts are marked as out of stock then it won't let them be added to the cart (gives the error message that the item has been removed from inventory), even though they still appear as an option below the cart.

The free gifts are ones that we do not normally stock, so I don' t want them to be able to be purchased in the store unless the shopping cart qualifies.

I promise I searched first!

Any help would be appreciated.

Claire

5 May 2010, 9:49 PM
#167
b13ella avatar

b13ella

New Zenner

Join Date:
May 2010
Posts:
1
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

pmgint:

I had to remove dangling carrot because I could not get it operating effectively however I now have a related problem where the shopping cart cannot be viewed. Message when viewing the shopping cart is:

1146 Table 'kee48203_zencart.TABLE_CARROT' doesn't exist
in:
[SELECT fg.*, p.products_id, p.products_model, p.products_price, p.products_image, p.products_status, pd.products_name FROM (TABLE_CARROT fg, products p) LEFT JOIN products_description pd ON (pd.products_id=fg.products_id) WHERE pd.language_id = '1' AND p.products_id = fg.products_id ORDER BY fg.threshold ASC]

Any ideas on what I need to do to correct this problem ??

Did anyone find a fix for this? I have uninstalled it too after giving up on it, but now I have the same the error.

Any SQL help would be great.

Cheers

15 May 2010, 7:49 AM
#168
valentina avatar

valentina

New Zenner

Join Date:
May 2010
Posts:
3
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

BritishAgent:

Hello

I am having trouble understanding how to hide gifts but still make them able to be added to the cart. The mod itself works fine but if the gifts are marked as out of stock then it won't let them be added to the cart (gives the error message that the item has been removed from inventory), even though they still appear as an option below the cart.

The free gifts are ones that we do not normally stock, so I don' t want them to be able to be purchased in the store unless the shopping cart qualifies.

I promise I searched first!

Any help would be appreciated.

Claire

Hello guys, I'm new here! I'm italian so forgive my bad english! I'll try to explain my problem with this mod.

If i set the gift as a product out of stock, customer can't find it when try to add it to the cart.

Besides, I noticed that, if I set the gift in stock and click on "add this to my cart", I'm redirected to the product page but I'm not able to insert it in my cart.

I'm not sure if I'm clear....

I have no error messages or similar. All seems to work properly but it doesn't.

Thank you in advance for your precious support.:smile:

Valentina.

15 May 2010, 3:00 PM
#169
valentina avatar

valentina

New Zenner

Join Date:
May 2010
Posts:
3
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

I try to unistall the mod but...................... now my site is broken! :cry::cry::cry:

this is the error:

1054 Unknown column 'p.products_carrot' in 'field list'
in:
[select p.products_tax_class_id, p.products_carrot, p.products_price from products p where p.products_id = '0' ]

Please HELP!!!!

15 May 2010, 3:33 PM
#170
valentina avatar

valentina

New Zenner

Join Date:
May 2010
Posts:
3
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

It's incredible.. I had to install it again to fix the problem... but I can't use it and so I'd like to remove it from my site.... I'm waiting for your support! Thank you.

12 Jul 2010, 1:34 AM
#171
joey87 avatar

joey87

New Zenner

Join Date:
Jul 2010
Posts:
3
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

hi im new to zen cart. im making a website for a client who wishes to use the dangling carrot functionality. i installed it as per the readme instructions but when i went to refresh my zen cart administration the page went blank and now i cant use any back-end administration features, the front-end is still up and running though i cant see any offers for a free product when i add items to my cart. i fear ive done something wrong and im not quite sure how to correct what i have done.

i am running zen cart 1.3.9b
i made a full backup before i started

i hope to hear from somebody soon!!

18 Sep 2010, 9:31 PM
#172
beez avatar

beez

Zen Follower

Join Date:
Sep 2005
Location:
Malmö, Sweden
Posts:
117
Plugin Contributions:
4

Re: Free Gifts-Dangling Carrot support

For me to get it to work with ZC 1.3.9f I had to make a change in /includes/classes/shopping_cart.php on rwo 1125:

From
if ( $check_status == 0 ) {

To
if ( $check_status == 0 && $products->fields['products_carrot']!=1) {

Thanx for a nice mod!

Focus dammit, I'm trying to focus!

SweetFabrik - True believer of Zen Cart!

http://www.last.fm/user/beez/

18 Sep 2010, 10:07 PM
#173
beez avatar

beez

Zen Follower

Join Date:
Sep 2005
Location:
Malmö, Sweden
Posts:
117
Plugin Contributions:
4

Re: Free Gifts-Dangling Carrot support

In order for a disabled (Out of stock) product to display the product info page (linked from the shopping cart) when the product is marked as a carrot, there are changes neede in two files:

/includes/modules/pages/product_info/main_template_vars.php
On row 23 and 58 change
where p.products_status = '1'

To
where (p.products_status = '1'
or p.products_carrot = '1')

/includes/modules/pages/product_info/header_php.php
On row 21 change
where p.products_status = '1'

To
where (p.products_status = '1'
or p.products_carrot = '1')

That worked for me :)

Focus dammit, I'm trying to focus!

SweetFabrik - True believer of Zen Cart!

http://www.last.fm/user/beez/

9 Oct 2010, 12:06 PM
#174
jen_ny avatar

jen_ny

New Zenner

Join Date:
Sep 2010
Posts:
14
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

Hi,

Just installed this and it looks great. If customers spend a certain amount the free gift pops up.

One question though...
I would like customers to be notified about the carrot. In the shopping cart, can a message be displayed such as:
"Spend xx more dollars to qualify for a free xxx"?

Thanks for any help you can offer.

24 Oct 2010, 5:49 AM
#175
gbliang avatar

gbliang

New Zenner

Join Date:
Sep 2009
Posts:
3
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

I have a problem,Now i installed it on my zen cart 1.38.it works.

my gift price is 5usd,my price of product is 60usd

when total price over 50usd,the customer can get a gift.

Now I make a purchase,the total price is 60+5=65usd ,why not 60USD ?

if or not the gift price need to set 0 usd ?

31 Oct 2010, 4:14 AM
#176
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

I am using Zen Cart 1.3.9h version will this contribution will work for this version?

31 Oct 2010, 4:34 AM
#177
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

When I install this mod in the admin area the admin index.php is blank I did a Debug test and it gave me this error:

[30-Oct-2010 23:26:58] PHP Fatal error: Call to undefined function zen_date_diff() in /home/hkeaton/public_html/adminarea/includes/header.php on line 75

Can someone help with this area?

2 Apr 2011, 7:47 PM
#178
lsullivan avatar

lsullivan

New Zenner

Join Date:
May 2010
Posts:
57
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

Hi,
Is there support for this mod? Here is my problem:

Version: 1.3.9.f
SQL Version: 5

I installed the most current free gifts mod. I followed all 6 steps. My admin page would not load my catalog of products any more. It is just blank (see screen shot attachment). My actual website would not load either due to a Syntax error. After reading through syntax error posts I decided to revert to my original default_filters php file instead of using the mod's version. Now my website is running (phew!), but my catalog will not load on the admin page. If I need to I will just revert to my original site and drop this mod but I would really like to use it.

I used winmerge before uploading the core files, but I could have made a mistake in one of them. Any tips would be helpful. In the future it would be great if the mod files clearly show where the modifications are. Some of the files had the common "//beg of free gift..." and "end of..." tags which are great, but others did not have consistent messaging.

Thank you for your advice,
Lindsay

8 Apr 2011, 10:48 PM
#179
lsullivan avatar

lsullivan

New Zenner

Join Date:
May 2010
Posts:
57
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

Hi all,
I fixed the above error, but I have a new one.

Since a new column was added to the product database, there are errors when you try to duplicate products. The error code is "1136 column count does not match value count".

How do I adjust my coding to add the new column in the database?

Lindsay

1 Jun 2011, 4:38 PM
#180
shekinah999 avatar

shekinah999

New Zenner

Join Date:
Jun 2011
Posts:
2
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

Hello, Having issues with installing this on my zen cart. I am using ZC version 1.3.7 and PHP 5.2.17. I followed the directions for the Dangling Carrot v1.31 for ZC 1.3.7. I am getting the following error when I go to the Free Gifts link in the admin:::

Warning: require(file:///E|/apache2triad/htdocs/zentest/admin/includes/application_top.php) [function.require]: failed to open stream: No such file or directory in /home/content/74/7701574/html/cart/admin/gift_add.php on line 13

Fatal error: require() [function.require]: Failed opening required 'file:///E|/apache2triad/htdocs/zentest/admin/includes/application_top.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/74/7701574/html/cart/admin/gift_add.php on line 13

Please help. Am I doing this right?

Thanks for any help....