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

Free Gifts-Dangling Carrot support

Views: 48,602

Results 121 to 140 of 237
8 Sep 2009, 4:57 AM
#121
fireflyz avatar

fireflyz

New Zenner

Join Date:
May 2007
Location:
Los Angeles
Posts:
89
Plugin Contributions:
0

Free Gifts-Dangling Carrot support

lankeeyankee:

Try this:

<?php /** ```Let me know if it works. Otherwise it's one of the other files, we'll figure it out. Didn't work. Now all page is blank after clicking the update to remove an item from the cart.
8 Sep 2009, 9:07 AM
#122
twdhosting avatar

twdhosting

Zen Follower

Join Date:
Mar 2005
Posts:
119
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

lankeeyankee:

I noticed that when you try to add the gift to the cart it takes you to the listing instead and you have to add to cart from there. Again, this might an issue with SSU and not this mod. The end of the query string is again incorrect on the add to cart button for the gift on the shopping cart page. It should have &action=buy_now&product_id="whatever" but yours only has &action=buy_now. I think this is why you are being directed to the product page to add it to the cart instead of it just being added to the cart when you first click it. Isn't there a setting in SSU for the amount of parameters to allow in the query string? I would check that and also post about this on the SSU forum, Yellow1912 is super helpful.

Also, I noticed that I can add a gift to the cart just as a regular product, but this mod disables the add to cart button on the product info display page and replaces it with a Return To Cart button. So, perhaps you haven't made all of the modifications, particularly to tpl_product_info_display.php or perhaps this is another clash with SSU?

Can you disable SSU and then try it all again? I am sure that this works as expected and need to eliminate once and for all that SSU is the problem before spending more time trying to diagnose this.

Thanks for the suggestion, I disabled SSU and it didn't make any difference... the free gift still remained in the cart when the paid for item was removed? Also the add to cart on the free gifts still went to the product page (I didn't realise it wasn't suppose to do that - I thought it was because some of the free items had attributes so the customer could choose the attribute before adding the free item to the cart?)

I will check out the tpl_product_info_display.php file as it quite possible I missed some of the code!

8 Sep 2009, 1:41 PM
#123
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Free Gifts-Dangling Carrot support

twdhosting:

Thanks for the suggestion, I disabled SSU and it didn't make any difference... the free gift still remained in the cart when the paid for item was removed? Also the add to cart on the free gifts still went to the product page (I didn't realise it wasn't suppose to do that - I thought it was because some of the free items had attributes so the customer could choose the attribute before adding the free item to the cart?)

I will check out the tpl_product_info_display.php file as it quite possible I missed some of the code!

I think with products with attributes that does happen, another poster had mentioned that. It's advisable to use products without attributes to avoid this and make it as easy as possible for people selecting gifts. Even if that means creating a new free product and just leaving out the attributes, like the one size hat that really doesn't need attributes since it only has one. Try that and see if it changes anything. And, is this a live site or a test site??

I really don't know why this isn't working for you guys. I have it working fine(apart from the known bugs described in this thread) on a live test site/clone of my super modified live site as well as a clean 1.3.8a with demo products. I can only surmise that there is a conflict in one of the other modifications that you have made somewhere else or a merging error. It's hard to say without going over all of the files that are involved. I will keep trying to help you figure it out, but I am no coding expert by a long shot, just someone who knows enough to usually get done what I need to get done for my projects.

Hopefully Strelitzia will post back with his revised files and can help, too.

Let me think about this for a bit to see if I can think of what may be happening.

I don't have this on my live site yet anyway since there are still 2 bugs that I know of that need to be resolved, the guest cart merge bug and the not showing up in the free gift category bug. Whether you want to implement this on a live site is up to you, if you have the gift category hidden then that bug is irrelevant to you and if you don't care if someone can get 2 gifts at once then the guest cart bug doesn't matter either.


Zen Cart and it's community are the best!!

8 Sep 2009, 6:36 PM
#124
twdhosting avatar

twdhosting

Zen Follower

Join Date:
Mar 2005
Posts:
119
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

lankeeyankee:

I think with products with attributes that does happen, another poster had mentioned that. It's advisable to use products without attributes to avoid this and make it as easy as possible for people selecting gifts. Even if that means creating a new free product and just leaving out the attributes, like the one size hat that really doesn't need attributes since it only has one. Try that and see if it changes anything. And, is this a live site or a test site??

I really don't know why this isn't working for you guys. I have it working fine(apart from the known bugs described in this thread) on a live test site/clone of my super modified live site as well as a clean 1.3.8a with demo products. I can only surmise that there is a conflict in one of the other modifications that you have made somewhere else or a merging error. It's hard to say without going over all of the files that are involved. I will keep trying to help you figure it out, but I am no coding expert by a long shot, just someone who knows enough to usually get done what I need to get done for my projects.

Hopefully Strelitzia will post back with his revised files and can help, too.

Let me think about this for a bit to see if I can think of what may be happening.

I don't have this on my live site yet anyway since there are still 2 bugs that I know of that need to be resolved, the guest cart merge bug and the not showing up in the free gift category bug. Whether you want to implement this on a live site is up to you, if you have the gift category hidden then that bug is irrelevant to you and if you don't care if someone can get 2 gifts at once then the guest cart bug doesn't matter either.

FIXED IT!!!!

Well actually it didn't need fixing - only the attributes removing from each product...

it's weird that when a product is marked as "carrot" and has attributes it caused:

The add to cart button to go to the product page

Stopped the Please remove other gifts/offers from your cart first message from displaying

Stopped the free item being removed from the cart when the full price item was removed

All I can think of at the moment is that because the free item was being added through the product page it wasn't registering as a free "carrot" product in the shopping cart?????

Thanks for all the help, it weird how someone mentions something sometimes and it triggers a brain spark :)

8 Sep 2009, 7:54 PM
#125
twdhosting avatar

twdhosting

Zen Follower

Join Date:
Mar 2005
Posts:
119
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

One more thing... I've got an ezpage setup describing the free gifts (how they work etc) and I want to be able to show the gifts on that page automatically... I am struggling a little here because the products have disapeared out of their free products category!

Any code suggestions to show pull the carrot items from the DB and list them on a page? (maybe with images)

Thanks

Tony

9 Sep 2009, 9:17 PM
#126
fireflyz avatar

fireflyz

New Zenner

Join Date:
May 2007
Location:
Los Angeles
Posts:
89
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

lankeeyankee:

Try this:

<?php /** * Page Template * * Loaded automatically by index.php?main_page=shopping_cart.<br /> } ?> <!-- ** END PAYPAL EXPRESS CHECKOUT ** --> <br class="clearBoth" /> </div> ```Let me know if it works. Otherwise it's one of the other files, we'll figure it out.

Hi Lankeeyankee,
Any luck with this file? :cry:

Thank you!

10 Sep 2009, 3:16 AM
#127
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Free Gifts-Dangling Carrot support

Fireflyz:

Hi Lankeeyankee,
Any luck with this file? :cry:

Thank you!

Sorry, haven't had a chance to look further, I am severely short staffed right now and sales are thankfully booming. It is a great problem to have but I am working 18 hour days just running the business and don't have any free time to look through code.

What other files did you have to merge instead of just copying over? This is most likely where the problem is.

By any chance, does the gift have attributes? The gifts can't have attributes.


Zen Cart and it's community are the best!!

10 Sep 2009, 3:26 AM
#128
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Free Gifts-Dangling Carrot support

twdhosting:

One more thing... I've got an ezpage setup describing the free gifts (how they work etc) and I want to be able to show the gifts on that page automatically... I am struggling a little here because the products have disapeared out of their free products category!

Any code suggestions to show pull the carrot items from the DB and list them on a page? (maybe with images)

Thanks

Tony

I'm not sure about that. You should post that in a more appropriate place to get some more knowledgeable help, perhaps where the ezpages forum is if there is one?

Did you try just pasting the carrot block from the shopping cart template file?


Zen Cart and it's community are the best!!

10 Sep 2009, 4:09 AM
#129
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Free Gifts-Dangling Carrot support

BTW, I figure out the gifts not showing in the categories. Go to includes/index_filters/default_filter.php. Around line 77 find:

where p.products_carrot = 0 and p.products_status = 1

and replace with:

where p.products_carrot = 1 and p.products_status = 1

Hopefully that is another bug squashed for good.:D


Zen Cart and it's community are the best!!

10 Sep 2009, 4:38 AM
#130
fireflyz avatar

fireflyz

New Zenner

Join Date:
May 2007
Location:
Los Angeles
Posts:
89
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

lankeeyankee:

Sorry, haven't had a chance to look further, I am severely short staffed right now and sales are thankfully booming. It is a great problem to have but I am working 18 hour days just running the business and don't have any free time to look through code.

What other files did you have to merge instead of just copying over? This is most likely where the problem is.

By any chance, does the gift have attributes? The gifts can't have attributes.

No problem! I understand. I'm glad you are having that kind of problem with your business :) I wish I could say the same. Anyways, I modified all other files as my site is modified many times.

I ran the debug when regenerating the partial blank page and this is what I get. I thought this error could give you a clue as to where the problem lies:

**PHP Warning: ** Cannot modify header information - headers already sent by (output started at /includes/templates/My_Template/common/tpl_header.php:36) in /includes/functions/functions_general.php on line 44

And here is what's on line 36 of tpl_header.php:

<div id="tagline"><?php echo HEADER_SALES_TEXT; ?></div>

Hope this helps, if not no worries. I appreciate your help so far.

cheers!

10 Sep 2009, 5:18 PM
#131
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Free Gifts-Dangling Carrot support

what's the line in includes/functions/functions_general.php on line 44? That is where the error is coming from. Could it be that it's another mod causing this that you were working on at the same time? Neither of those files are used by this mod.


Zen Cart and it's community are the best!!

12 Sep 2009, 9:10 PM
#132
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Free Gifts-Dangling Carrot support

lankeeyankee:

BTW, I figure out the gifts not showing in the categories. Go to includes/index_filters/default_filter.php. Around line 77 find:

where p.products_carrot = 0 and p.products_status = 1

> 
> ```php
where p.products_carrot = 1 and p.products_status = 1
```Hopefully that is another bug squashed for good.:D

Disregard that post.... The way to show the free gifts in their categories is to not modify includes/index_filters/default_filter.php at all, just use your existing default_filter.php. So, only use the default_filter.php file from this mod if you want your gifts to be hidden from categories views.


Zen Cart and it's community are the best!!

13 Sep 2009, 4:17 AM
#133
fireflyz avatar

fireflyz

New Zenner

Join Date:
May 2007
Location:
Los Angeles
Posts:
89
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

lankeeyankee:

what's the line in includes/functions/functions_general.php on line 44? That is where the error is coming from. Could it be that it's another mod causing this that you were working on at the same time? Neither of those files are used by this mod.

Here is more info on that error:
https://www.zen-cart.com/tutorials/index.php?article=87

A friend already fixed this :D
Thanks for trying, lankeeyankee!

13 Sep 2009, 4:30 AM
#134
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Free Gifts-Dangling Carrot support

Fireflyz:

Here is more info on that error:
https://www.zen-cart.com/tutorials/index.php?article=87

A friend already fixed this :D
Thanks for trying, lankeeyankee!

So it's working now?


Zen Cart and it's community are the best!!

14 Sep 2009, 7:27 AM
#135
fireflyz avatar

fireflyz

New Zenner

Join Date:
May 2007
Location:
Los Angeles
Posts:
89
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

lankeeyankee:

So it's working now?
Yes! (:cry:ing from joy)

15 Oct 2009, 4:14 PM
#136
yozoo avatar

yozoo

New Zenner

Join Date:
Sep 2008
Posts:
10
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

lankeeyankee:

Disregard that post.... The way to show the free gifts in their categories is to not modify includes/index_filters/default_filter.php at all, just use your existing default_filter.php. So, only use the default_filter.php file from this mod if you want your gifts to be hidden from categories views.

I still can not fix this issue. I did not modify any includes/index_filters/default_filter.php at all. But it still said that none of products are active in the gifts categories.

20 Oct 2009, 3:31 PM
#137
kvwlls avatar

kvwlls

New Zenner

Join Date:
Jan 2009
Posts:
32
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

I've been keeping a check on this thread keenly.

An excellent mod, but, as with everyone else, i'm experiencing problems, so have disabled the gifts and stopped it for the time being. I had the same issues of the free gift remaining in the cart after the customer decreased the order quantity below the threshold, and also the fact that you can't edit current carrots already 'dangled'.

Will eagerly await any updated bug free version! Good work guys!

a (fairly novice but learning fast) Zen Cart convert.
Kev

https://www.sunplastics.co.uk

22 Oct 2009, 9:46 AM
#138
pmgint avatar

pmgint

New Zenner

Join Date:
Nov 2008
Posts:
15
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

Free gift with coupon ?

Am wanting to offer a select group of prospects a free gift for any purchase. Can I achieve with this add-on ?

The simplw way I imagines was via coupon redemption for a free product but it seems zen cannot offer a free gift for coupon ?:cry:

23 Oct 2009, 8:46 PM
#139
krispy2001 avatar

krispy2001

New Zenner

Join Date:
Oct 2009
Posts:
1
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

Hello:

I just installed Dangling Carrot, and it seems to be working (except for some formatting I'll need to look into), but now none of my products show by category when there is more than one product in he category.

Any suggestions?

Zen Cart 1.3.8a
Database Patch Level: 1.3.8

28 Oct 2009, 10:23 AM
#140
pmgint avatar

pmgint

New Zenner

Join Date:
Nov 2008
Posts:
15
Plugin Contributions:
0

Re: Free Gifts-Dangling Carrot support

Help !

Installed Dangling carrot and all looked fine. tested it and it seemd to work fine. Then 1/2 hour later and big problems.

My page footer has disappeared.
My welcome page has disappeared.
NO products in my cart are being displayed.
what on earth has happened ???:ohmy: