Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Incorrect Path


Guest

Recommended Posts

>_< I have set up new OsCommerce site, and I'm trying to connect the Paypal Direct Payment. It doesn't work because the path is wrong. The cart is at http://www.in-sightinc.net/cart. If I click on the Paypal link on the shopping cart, the link is to http://www.in-sightinc.net/cart/cartshoppingcart.php. It should be http://www.in-sightinc.net/cart/shoppingcart.php.

If I go farther into the checkout process, on the page after entering address information, I can go to Paypal. When I try to pay, I get a message "/cart/cartcheckout_payment.php was not found"

 

In both cases, it's adding "cart" after the final /. Can anyone point me to the file ? I've checked filenames.php, and there it's correct. It appears that everywhere else OsCommerce is working.

 

 

Thanks in advance.

 

 

Ed

Link to comment
Share on other sites

>_< I have set up new OsCommerce site, and I'm trying to connect the Paypal Direct Payment. It doesn't work because the path is wrong. The cart is at http://www.in-sightinc.net/cart. If I click on the Paypal link on the shopping cart, the link is to http://www.in-sightinc.net/cart/cartshoppingcart.php. It should be http://www.in-sightinc.net/cart/shoppingcart.php.

If I go farther into the checkout process, on the page after entering address information, I can go to Paypal. When I try to pay, I get a message "/cart/cartcheckout_payment.php was not found"

 

In both cases, it's adding "cart" after the final /. Can anyone point me to the file ? I've checked filenames.php, and there it's correct. It appears that everywhere else OsCommerce is working.

Thanks in advance.

Ed

You messed up your configure.php files and need to fix them.

Link to comment
Share on other sites

You messed up your configure.php files and need to fix them.

 

No, there's nothing wrong with my configure.php. I just fixed the problem, and it looks a lot like a bug to me.

 

In /includes/paypal_wpp/paypal_wpp_include.php, at about line 47 you will see this:

echo tep_href_link(str_replace('/', '', $_SERVER['SCRIPT_NAME']), 'action=express_checkout&return_to=' . $return_to, 'SSL');

Now in my system I had installed osCommerce at /cart. So when viewing shopping_cart.php, $_SERVER['SCRIPT_NAME'] returns "/cart/shopping_cart.php". The str_replace changes that to "cartshopping_cart.php". What I did was change that to two lines:

 

$path_parts = pathinfo($_SERVER['SCRIPT_NAME']);

echo tep_href_link($path_parts['basename'], 'action=express_checkout&return_to=' . $return_to, 'SSL');

 

And it works correctly now.

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