Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Hiding a Payment Module Based on IP Address


invstg8r

Recommended Posts

I'm not sure if there are any simple contributions that would do this, but our company will be using the osCommerce site to enter orders that we receive via snail mail as well as online orders.

 

Customers arriving to our online site will not have the option of Check/Money Order as a payment method.

 

Our staff will be using the same site to enter mailed orders that will contain checks, those people will need to see the option for Check/Money Order.

 

I used a "recipe" out of Monika's excellent book, "Deep Inside osCommerce The Cookbook" and created a new one to hide a payment method based on a visitor's IP address. Her code was to hide the payment method for all accept a particular customer ID. My recipe didn't work.

 

Can anyone help me with this? Any ideas?

 

- Mark A.

Link to comment
Share on other sites

I'm not sure if there are any simple contributions that would do this, but our company will be using the osCommerce site to enter orders that we receive via snail mail as well as online orders.

 

Customers arriving to our online site will not have the option of Check/Money Order as a payment method.

 

Our staff will be using the same site to enter mailed orders that will contain checks, those people will need to see the option for Check/Money Order.

 

I used a "recipe" out of Monika's excellent book, "Deep Inside osCommerce The Cookbook" and created a new one to hide a payment method based on a visitor's IP address. Her code was to hide the payment method for all accept a particular customer ID. My recipe didn't work.

 

Can anyone help me with this? Any ideas?

 

- Mark A.

Hi Mark, and many thanks :-)

 

Verify in your config table this variable has been set to true, as only then is the ip filled ... exerpt from application_top.php

 

 

// verify the IP address if the feature is enabled

if (SESSION_CHECK_IP_ADDRESS == 'True') {

$ip_address = tep_get_ip_address();

 

by default, it is set to false ...

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

Hi Mark, and many thanks :-)

 

Verify in your config table this variable has been set to true, as only then is the ip filled ... exerpt from application_top.php

by default, it is set to false ...

 

Yes ...that was it! I switched it to true and it worked like a charm.

 

Thank you...thank you!

 

:D :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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