Jack_mcs Posted April 26, 2005 Share Posted April 26, 2005 I just uploaded a new new version. I wasn't aware that the link to add the gift tothe cart was not being displayed. If the link is not showing, do the following to update your catalog/shopping_cart.php files. Find $freebie[$p]['link'] = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $gift['products_id']) . '">' . tep_image_button('button_select_now.gif', 'Select ' . $gift['products_id'] . TEXT_NOW) . '</a>'; and replace it with $freebie[$p]['link'] = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $gift['products_id']) . '">' . tep_image_button('button_add_now.gif', 'Select ' . $gift['products_id'] ) . '</a>'; Then find <br>(Maximum 1 gift per order) and add <br>'.$link.' after it. You also need to add the new image to your files. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted April 26, 2005 Share Posted April 26, 2005 I just uploaded a new new version. I wasn't aware that the link to add the gift tothe cart was not being displayed. If the link is not showing, do the following to update your catalog/shopping_cart.php files. Find $freebie[$p]['link'] = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $gift['products_id']) . '">' . tep_image_button('button_select_now.gif', 'Select ' . $gift['products_id'] . TEXT_NOW) . '</a>'; and replace it with $freebie[$p]['link'] = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $gift['products_id']) . '">' . tep_image_button('button_add_now.gif', 'Select ' . $gift['products_id'] ) . '</a>'; Then find <br>(Maximum 1 gift per order) and add <br>'.$link.' after it. You also need to add the new image to your files. Jack <{POST_SNAPBACK}> Works great thanks. Any help with the side column link to all the free offers? Regards Quote Link to comment Share on other sites More sharing options...
Guest Posted April 26, 2005 Share Posted April 26, 2005 Works great thanks. Any help with the side column link to all the free offers? Regards <{POST_SNAPBACK}> I am not running anything except sts and dangling carrot and pwa. Yet when I add the product to my cart for a free gift I get the "Product Not Found" Error if I set the stock to "Not Available", if I make it Available then Anyone can get it. What is the fix? Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted April 26, 2005 Share Posted April 26, 2005 When you click on the Gifts link in admin, does your gift product show up in the dropdown list? If not, then it is not set up correctly. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted April 26, 2005 Share Posted April 26, 2005 When you click on the Gifts link in admin, does your gift product show up in the dropdown list? If not, then it is not set up correctly. Jack <{POST_SNAPBACK}> I have set it back to default and followed the instructions, and still get the fault. Product doesnt appear in list when I set model as gift Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted April 26, 2005 Share Posted April 26, 2005 Then that is the problem. The item has to be declared starting with Gift. Is that how you have it declared? Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted April 26, 2005 Share Posted April 26, 2005 Then that is the problem. The item has to be declared starting with Gift. Is that how you have it declared? Jack <{POST_SNAPBACK}> OK got it back so that now I get the dropdown list, I can add my gift through here. Then when I click on add now it comes back with "product not found" Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted April 27, 2005 Share Posted April 27, 2005 Then there is something wrong with your installation of the contribution or with your shop in general. When you click on the Gifts link in admin, it reads in the database and lists all products that begin with Gift. Then, when you click add, it re-reads the same database and pulls out the same data (plus some other things) again. So if it works the first time and not the second there must be a coding problem. At least I can't imaging what else would be causing it. I would reinstall the original files changed by this contribution and then re-install it. Don't just go over what you did because it is very easy to overlook a mistake that way and will be a waste of your time. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Jack_mcs Posted April 27, 2005 Share Posted April 27, 2005 OK, one more try. When I uploaded version 1.4, I had inadvertentanly introduced a new bug. The product could not be removed from the shopping cart with Update. If you are having this problem, then you need to redo the instructions for catalog/shopping_cart.php. I apologize if I have caused anyone grief with this error. I have uploaded a new version with the correct instructions. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Jack_mcs Posted April 27, 2005 Share Posted April 27, 2005 Works great thanks. Any help with the side column link to all the free offers? Regards <{POST_SNAPBACK}> I just uploaded a new version that contains an infobox to display the gift items. To update, just copy the infobox to the includes/boxes directory, add this to the includes/languages/english.php file// free_gifts in includes/boxes/gifts/php define('BOX_HEADING_GIFTS', 'Special Gifts'); and add this to the left or right column file include(DIR_WS_BOXES . 'gifts.php'); Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted April 27, 2005 Share Posted April 27, 2005 I just uploaded a new version that contains an infobox to display the gift items. To update, just copy the infobox to the includes/boxes directory, add this to the includes/languages/english.php file// free_gifts in includes/boxes/gifts/php define('BOX_HEADING_GIFTS', 'Special Gifts'); and add this to the left or right column file include(DIR_WS_BOXES . 'gifts.php'); Jack <{POST_SNAPBACK}> Sorry mate i may be confusing you here.. I can add the gifts into the backend no problem, remove them, edit etc.. The issue I get is when you try to "Add Gift" through the shopping cart. It recognises there is a free gift, but then wont allow me to add it. It works fine if I set stock to Available, but not if I set to not Available Quote Link to comment Share on other sites More sharing options...
Guest Posted April 27, 2005 Share Posted April 27, 2005 Sorry mate i may be confusing you here.. I can add the gifts into the backend no problem, remove them, edit etc.. The issue I get is when you try to "Add Gift" through the shopping cart. It recognises there is a free gift, but then wont allow me to add it. It works fine if I set stock to Available, but not if I set to not Available <{POST_SNAPBACK}> OK I have found my problem. The product I want to use is an ebook, when I add any other gift it works fine, but as soon as I add a file as a product attribute it produces this error. I know this might not be your contrib but any ideas? Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted April 27, 2005 Share Posted April 27, 2005 Just to be clear, this is not my contribution. I simply made some changes to it. As for your problem, I don't have an answer for you. I don't understand what you mean by "add a file as a product attribute ." But if you are talking about using a product that has attributes as a gift, I don't think that would matter. You should try isolating the problem. If you add a regular product and make it a gift you said it works. What happens then if you add an attribute to it? If it still works, go through each of the options for the two products (the one that works and the one that doesn't) and try setting them the same. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted April 27, 2005 Share Posted April 27, 2005 Just to be clear, this is not my contribution. I simply made some changes to it. As for your problem, I don't have an answer for you. I don't understand what you mean by "add a file as a product attribute ." But if you are talking about using a product that has attributes as a gift, I don't think that would matter. You should try isolating the problem. If you add a regular product and make it a gift you said it works. What happens then if you add an attribute to it? If it still works, go through each of the options for the two products (the one that works and the one that doesn't) and try setting them the same. Jack <{POST_SNAPBACK}> Sorry the product is an ebook and you can specify what the filename is in oscommerce through the attributes section. When I add this attribute to any gift product it stops the item from being added. Its blatantly a fault with something I am doing on the product. Quote Link to comment Share on other sites More sharing options...
irishmystic Posted May 6, 2005 Share Posted May 6, 2005 The issue I get is when you try to "Add Gift" through the shopping cart. It recognises there is a free gift, but then wont allow me to add it. It works fine if I set stock to Available, but not if I set to not Available <{POST_SNAPBACK}> Hi all, This is a great contribution and I just installed it today. Everything seems to be working fine and I love the carrot "just spend x dollars more to get the gift"! However, I am having the same problem, as above, although I do not have any attribute contributions added. If the item is marked out of stock in the admin, the items will show as free gifts in the admin and in the catalog, but when you click on the "add" button in the shopping cart nothing happens, it only refreshes the cart. The free items show that you have reached the threshold, etc, but the button only works, if the item is marked as in stock in the admin. Any ideas, anyone? One more thing, I just noticed. The items cannot be removed (deleted) from my admin, at all. That is certainly not a huge issue, as I can delete them from the table easy enough. Just thought I would mention it. The download I used is the most recent 1.7 As it is, I can probably use this as is. It is a great contribution! The items are linkable in the shopping cart and I can give a brief description and mention that these are "specials" and may not be purchased by themselves. If anyone has any thoughts on what we may have done wrong with the admin or cart, I am all eyes. ;) Peace, Erin. Quote Link to comment Share on other sites More sharing options...
Snowman Posted May 7, 2005 Share Posted May 7, 2005 Im wondering if somone can help me with a weird issue with this mod. ive got it all setup however /admin/gift_add.php doesnt show any products in the drop down box. anyone have any ideas as to why this would be??? Quote Link to comment Share on other sites More sharing options...
irishmystic Posted May 7, 2005 Share Posted May 7, 2005 Im wondering if somone can help me with a weird issue with this mod. ive got it all setup however /admin/gift_add.php doesnt show any products in the drop down box. anyone have any ideas as to why this would be??? <{POST_SNAPBACK}> Hi Snowman, I did not quite understand this, myself, at first. I have another mod that requires the product begin with gift, as well, but the "model" rather than the name. This mod requires the NAME begin with Gift, Like "Gift - Free Rose Quartz", or something like that. You can duplicate any item you like and rename it to "Gift ~ whatever", and it should appear in the box. It does not matter what the "model" is, just the product name. If you do have products already called Gift something, then I don't have any help to offer you. Hope this helps! Peace, Erin :D Quote Link to comment Share on other sites More sharing options...
henk3001 Posted May 25, 2005 Share Posted May 25, 2005 Hi nice contrib, but how can you make this work "just spend x dollars more to get the gift"! Henk Quote Link to comment Share on other sites More sharing options...
henk3001 Posted May 25, 2005 Share Posted May 25, 2005 (edited) Hi nice contrib, but how can you make this work "just spend x dollars more to get the gift"! Henk <{POST_SNAPBACK}> Sorry it works :D the $near_limit is 20 Edited May 25, 2005 by henk3001 Quote Link to comment Share on other sites More sharing options...
knokenet Posted May 26, 2005 Share Posted May 26, 2005 Hey, Followed the whole thread, but still no solution for the admin side. Cannot update, edit or delete selected products. One more thing: When going over the threshold, the 'buy now' image appears. I'd also like to link the product's image to its product's info page, so people will have some idea of what gift they are getting. I'm using the latest version, 1.7. Any ideas??? Quote Link to comment Share on other sites More sharing options...
irishmystic Posted May 27, 2005 Share Posted May 27, 2005 Solved my own problem. I have the Price Break per product Mod and it uses a PriceFormatter.php function called from get_products() to query the product list and format prices. The products query included a WHERE clause that excluded the products_status='0'. I modified it to do a join on the free_gifts table and see if the product existed. Everything is working fine now. <{POST_SNAPBACK}> Hi Scott, I am having the same problem with the price break mod and gift items not showing up in the cart when a price break item is there. Could you post your fix? I am still learning php and am afraid I might just break it.... :-" Thanks, for your help! Peace, Erin Quote Link to comment Share on other sites More sharing options...
Guest Posted May 28, 2005 Share Posted May 28, 2005 (edited) Hey, Followed the whole thread, but still no solution for the admin side. Cannot update, edit or delete selected products. <snip> I'm using the latest version, 1.7. <{POST_SNAPBACK}> I'm having exactly the same problem - cannot update, edit or delete gifts on the admin side. I can insert new ones. Anybody got a solution? Great contribution btw. - Rebecca Edited May 28, 2005 by rebelina Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted May 29, 2005 Share Posted May 29, 2005 (edited) I have uploaded a new version. - Added link to the displayed image - Added code to ignore out of stock gift products To update from a previous version, code in catalog/shopping_cart.php and boxes/gifts.php was changed. Jack Edited May 29, 2005 by Jack_mcs Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Jack_mcs Posted May 29, 2005 Share Posted May 29, 2005 I'm having exactly the same problem - cannot update, edit or delete gifts on the admin side. I can insert new ones. Anybody got a solution? Great contribution btw. - Rebecca <{POST_SNAPBACK}> I can't see a problem with the admin section. Do you get any kind of indication at all when you try to edit/delete an gift. Also, I assume you are speaking about when you try to do this in admin->catalog->Gifts. Is that correct? Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted May 29, 2005 Share Posted May 29, 2005 Im wondering if somone can help me with a weird issue with this mod. ive got it all setup however /admin/gift_add.php doesnt show any products in the drop down box. anyone have any ideas as to why this would be??? Same problem here. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.