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.
Last edited by lankeeyankee; 8 Sep 2009 at 02:46 PM.
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 :)
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
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.
BTW, I figure out the gifts not showing in the categories. Go to includes/index_filters/default_filter.php. Around line 77 find:
and replace with:PHP Code:where p.products_carrot = 0 and p.products_status = 1
Hopefully that is another bug squashed for good.PHP Code:where p.products_carrot = 1 and p.products_status = 1
![]()
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:
Hope this helps, if not no worries. I appreciate your help so far.Code:<div id="tagline"><?php echo HEADER_SALES_TEXT; ?></div>
cheers!