Dave01978 Posted May 17, 2004 Share Posted May 17, 2004 im trying to install this free item mod for orders over $100.00 I added the product and changed the date in the databaase, however im not sure where to add the code i've added it to several shopping_cart.php files but keep getting errors andyone know which file it needs to gointo and where in that file? Thanks in advance Dave Quote Link to comment Share on other sites More sharing options...
Guest Posted May 17, 2004 Share Posted May 17, 2004 what did the contribution readme file say? which contribution? Quote Link to comment Share on other sites More sharing options...
Dave01978 Posted May 17, 2004 Author Share Posted May 17, 2004 (edited) forgot to add the link of the mod http://www.oscommerce.com/community/contri...ns,1895/page,12 Here is the readme (i've edited it my site info and price info already) SC Free Gift Contribution By Norman Hinks. With help from G.Waudby This is a basic code addition to provide a free gift option to most stores. I'm using it on MS2.2 and it works fine with the DHTML Menu active. Set up a category for your free products but do not give it a name, set its position to 99. This ensures its the last thing on the menu if it does show! Put your products in here as usual. Using Php MyAdmin, alter the creation dates of the Free gifts in order to remove them from the New Products windows set the Year for last year. Add this code to where ever you wish to link to your free gifts. e.g shopping_cart.php <?php if ($cart->show_total()>=100) { ?> <font face="Verdana, Arial, Helvetica, sans-serif" size="2" color=red> <a href="http://waterlesscarwashproducts.com/catalog/product_info.php?products_id=54">You have spent enough for a free gift.<b> Click here </B>to choose one if you haven't already </a></font> <?php } else { echo "<font face=Verdana size=2 color=red><b>"; echo "You only have to spend "; echo $currencies->format(-$cart->show_total()+100); echo " more to receive your free gift.</b>"; echo "</font>"; } ?> The following changes are required to the above code. www.your_site.co.uk/~ - set this to your own site 35 - This is the figure at which the free gift page is activated. This needs setting in two places. default.php may need to be index.php as was my case. cPath=169 - This needs to change to whatever your free category path is. If you have trouble working this out, give it a name and when it appears in the menu, click it and the path will be shown in the address bar. remove Temporary name and its hidden again! Enjoy. This doesnt stop multiple free gifts being selected but I'm sure that will come. Edited May 17, 2004 by Dave01978 Quote Link to comment Share on other sites More sharing options...
Guest Posted May 17, 2004 Share Posted May 17, 2004 per the instructions, Add this code to where ever you wish to link to your free gifts. e.g shopping_cart.php go to http://www.yourdomain.com/catalog/shopping_cart.php and see what it looks like without the code, then choose where you may want it displayed, then find that area in the php file and add the contribution code. piece of cake . . . Quote Link to comment Share on other sites More sharing options...
Dave01978 Posted May 17, 2004 Author Share Posted May 17, 2004 ok i was having a dumb moment i got it to work now, and i wasn't 100% sure if i was putting into the right file before Thanks dave 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.