Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

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

Posted

what did the contribution readme file say? which contribution?

Posted (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 by Dave01978
Posted

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 . . .

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...