Jump to content
JACUK

Payment Method Not Showing in Checkout

Recommended Posts

Hi,

osCommerce Online Merchant v2.3.4.1 CE

Getting to the final stages of setting a shop up. Planning to use Worldpay Hosted Pages, client has setup all the accounts with Worldpay.

I seem to have one major problem I cannot get any payment method to display in the checkout process.

I have configured Worldpay, doesn't show, even turned on COD and Check - nothing (see screen grab.

I have probably missed something simple but cant see anything that appears wrong.

Some fresh eyes and ideas would be appreciated.

Thanks,

 

Julian

CaptureCheckout.JPG

Share this post


Link to post
Share on other sites
1 hour ago, JACUK said:

I have configured Worldpay, doesn't show, even turned on COD and Check - nothing (see screen grab.

What happens if you disable all of the modules except COD? If it shows then something is wrong in the code of one of the other modules. If it still doesn't display, see if there is an error_log file in the shops root to see if any errors are occurring.

Share this post


Link to post
Share on other sites

Hi Jack_mcs,

Removed all modules and then reinstalled COD.

Still no payment method showing up in the checkout.

No eror log at server root.

Any other thoughts?

Julian

Share this post


Link to post
Share on other sites

1) turn on error reporting so you see on screen as things go wrong while debugging.

2) go to you db and check your configuration table and see if the payment modules are showing in that.

3 ) check public_html/checkout_payment.php or replace form known good source.

5) check classes/payment.php or replace form known good source.

also i assume you are running stock CE frozen, if not turn off any custom code you have installed or other check out add-on's.

 


 

Share this post


Link to post
Share on other sites

Hi,

 

have reached the "step away and start afresh tomorrow" point!

will look at what you have suggested tomorrow.

Extracted from the readme.md file below if that helps identify any other suggestions.

Basic installation of this package with only a few minor changes, nothing that should affect core functions.

 

Any thoughts would be appreciated.

 

Thanks

 

osCommerce 2.3.4.1 CE
=====================
osCommerce
+ Bootstrap v3  
+ jQuery
+ other external scripts

Status
======
FROZEN.  From today onwards;

- no Issues will be accepted
- no Pushes will be accepted

Minimum PHP Version
===================
7.0

Discussion Forum
================
https://forums.oscommerce.com/forum/107-oscommerce-online-merchant-community-bootstrap-edition/

Demo Site
=========
http://template.me.uk/234bs3/index.php

Share this post


Link to post
Share on other sites
27 minutes ago, JACUK said:

few minor changes, nothing that should affect core functions.

Best to check install is working first and then make changes one at a time checking core function each time. Should then show what if anything caused the problem.

Also best to turn on error display during the seting up so you don't miss any errors, you can then turn it off again.

includes/application_top.php

  • Find:

    error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT);
     
  • Change to:

    ini_set('display_errors', 1);
    ini_set('display_startup_errors', 1);
    error_reporting(E_ALL);

admin/includes/application_top.php

  • Find:

    error_reporting(E_ALL & ~E_NOTICE);

    if (defined('E_DEPRECATED')) {
      error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
    }
     
  • Change to:

    ini_set('display_errors', 1);
    ini_set('display_startup_errors', 1);
    error_reporting(E_ALL);

 

Revert back when you have finished.


 

Share this post


Link to post
Share on other sites

Thankyou JcMagpie,

The small changes i have made from the initial install have only been adding the T&c's, Privacy Policy, some additional text in the footer area and changing the word catalog to shop in the breadcrumbs and setting currency to GBP and region/zone to UK; as well as adding the products & categories! So i would think its unlikely that these would affect the display of the payment method?

I have made the mods to the php files you detailed, when i try to process another order same thing happens - no payment method is displayed and no errors are displayed (using Firefox Quantum 67.0.2 (64-bit) - and no error log file is being created.

It feels to me that something is not switched on rather than an error?

Again any further thoughts would be appreciated.

 

Thanks,

 

Julian

Share this post


Link to post
Share on other sites
3 hours ago, JACUK said:

currency to GBP and region/zone to UK;

And that is your issue, if zones are not setup prorperly they will stop shipping from showing. So go check your region / zones are correct for the shipping you have selected.


 

Share this post


Link to post
Share on other sites

Thankyou JcMagpie,

Shipping is not the issue - displays fine on the page prior to the one in my screen grab above.

 

It's the Payment Method that is not showing - regardless of which payment module I try. Want to use Worldpay, can't get it to display. Even tried COD & Check, nothing displays. That's the problem.

I have re-checked all the settings and nothing is standing out as incorrect? and no error messages are being displayed.

As ever ant further thoughts would bve appreciated.

 

Julian

Share this post


Link to post
Share on other sites
23 minutes ago, JACUK said:

Shipping is not the issue

🙄 Sorry brain fart! mixing problems, must engage brain. Well you may just have a bad in stall. Try a new install in a subdirectory and check before making any chnages. Also make a fresh download from here

https://github.com/gburton/Responsive-osCommerce/archive/2341-Frozen.zip


 

Share this post


Link to post
Share on other sites

as a test try setting the zone in the payment module to none if the payment now shows then you can go about setting up zones if you want the payment only to be available for a specific zone.


No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P


Support The Project
Documentation/Knowledgebase/Discussions
 

Share this post


Link to post
Share on other sites

Hi JcMagpie & 241,

Well between your two posts progress has been made! (and JcMagpie don't  worry about the brain fart - i get them to - can't even get a cure from my Dr!!)

I went through two clean installations on a different domain (one i own - hosted on the same platform), both worked straight out of the box. They even worked when I added the Worldpay payments module! All of this was with US as the store home country and $ as the currency. All good so far until I tried changing currency and home country, then no payment options.

Then I saw 241's post, so i set the zone to none and bingo the payment module works, connects with Worldpay.

So clearly there is an issue with Zones, now as far as i can see i have set everything up as it should be. Any thoughts on what to double check would be appreciated.

I have attached a screen grab of the confirmation page before handing off to Worldpay and it has raised one other query, after some of the text fields there is a set of (). Any thoughts?

Thanks as ever,

Julian

Checkout-Capture001a.jpg

Share this post


Link to post
Share on other sites

Meant to say this is working on the original production site and I have turned off error reporting as originally detailed by JcMagpie.

And one other question if i may - thePayment Method box (marked 2 on the screen grab) how can i change Credir Card to Credit/Debit Card ?

 

Thanks

Share this post


Link to post
Share on other sites

I will deal with second question first as it is straight forward

you can change the wording in the language file for the payment, in this case includes\languages\english\modules\payment\[name of payment].php

Back to first question

Is the payment module for all zones or for UK?

What have you got setup for zones with regards to United Kingdom?

What do you have setup for default country and zone for the store in configuration?

In localizations > currency what do you have as default currency?

there are more questions and checks but these will do for now


No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P


Support The Project
Documentation/Knowledgebase/Discussions
 

Share this post


Link to post
Share on other sites
Posted (edited)

I did not see that bit of the question about () in shipping

If the text in includes\languages\[language]\modules\shipping\[shipping].php for MODULE_SHIPPING_[shipping]_TEXT_WAY is blank you will have nothing in the ()

e.g. includes\languages\english\modules\shipping\flat.php

define('MODULE_SHIPPING_FLAT_TEXT_WAY', '');

 

Edited by 241

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P


Support The Project
Documentation/Knowledgebase/Discussions
 

Share this post


Link to post
Share on other sites

Hi 241,,

Thanks payment file updated with text I wanted.

Default currency GBP (£)

Zones,  UK only and set to UK in My Store

If I set Zone to none in the Worldpay Payment Module all works ok and payment method shows in checkout process.

If i set it to UK no payment method shows.

A couple of screen grabs attached.

As ever any thoughts would be appreciated.

Julian

storecapture.jpg

zonescapture.jpg

Share this post


Link to post
Share on other sites
Posted (edited)
52 minutes ago, JACUK said:

If i set it to UK no payment method shows.

Ok so replicated your problem on test site. The only way I can make it behave like you discribe is if one step is not completed. When you set up a new zone you have to do 2 steps the second one is a bit confusing and if missed results in your condition.

image.png.13c74f8ac73a71428083a386fdc6940f.png

once you have setup the new zone you must then add that to the Tax Zones or no paymet options will be shown.

image.thumb.png.a476ecb3e256fb2e81f00eca67ccafc2.png

Edited by JcMagpie

 

Share this post


Link to post
Share on other sites

The payment module will be reliant on geo_zone which is setup via the Tax Rates and Tax Zones to populate the zones_to_geo_zones table in the database if you have access to the database you can check to see if you have entries in the zones_to_geo_zones table for UK

what you will have is

zone_country_id from the countries table

 zone_id from the zones table

geo_zone_id from the geo_zones table which will be created when you set up Tax Rates and Tax zones

Do you have:

Tax Rates set for UK
Tax Zones for UK with Country United Kingdom and Zone UK

I think I had an issue with zone set as Zones-UK Code-UK, so set it as Zones-UK Code-GB

other things to look at are the default settings in includes\languages\english.php as they are usually USA rather than UK

things to look at in includes\languages\english.php

@setlocale(LC_ALL, array('en_GB.UTF-8', 'en_GB.UTF8', 'enu_gb'));

define('DATE_FORMAT_SHORT', '%d/%m/%Y');  // this is used for strftime()
define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime()
define('DATE_FORMAT', 'd/m/Y'); // this is used for date()
define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S');
define('JQUERY_DATEPICKER_I18N_CODE', ''); // leave empty for en_US; see http://jqueryui.com/demos/datepicker/#localization
define('JQUERY_DATEPICKER_FORMAT', 'dd/mm/yy'); // see http://docs.jquery.com/UI/Datepicker/formatDate

////
// Return date in raw format
// $date should be in format dd/mm/yyyy
// raw date is in format YYYYMMDD, or DDMMYYYY
function tep_date_raw($date, $reverse = false) {
  if ($reverse) {
   return substr($date, 0, 2) . substr($date, 3, 2) . substr($date, 6, 4);
  } else {
   return substr($date, 6, 4) . substr($date, 3, 2) . substr($date, 0, 2);
  }
}

// if USE_DEFAULT_LANGUAGE_CURRENCY is true, use the following currency, instead of the applications default currency (used when changing language)
define('LANGUAGE_CURRENCY', 'GBP');

// Global entries for the <html> tag
define('HTML_PARAMS', 'dir="ltr" lang="en"');

// charset for web pages and emails
define('CHARSET', 'utf-8');

also

define('DOB_FORMAT_STRING', 'dd/mm/yyyy');

define('ENTRY_DATE_OF_BIRTH_ERROR', 'Your Date of Birth must be in this format: DD/MM/YYYY (eg 21/05/1970)');
define('ENTRY_DATE_OF_BIRTH_TEXT', 'eg. 21/05/1970');

 


No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P


Support The Project
Documentation/Knowledgebase/Discussions
 

Share this post


Link to post
Share on other sites

JcMagpie,

You are a genius!! It works.

I would have never reached that solution on my own.

The () issue, my payments-[Method].php file does not have the code you described but the code does appear in flat.php.

However if i add text between the ' ' it appears on the shipping method page below the shipping type. but the () still appears on the Order Confirmation page.

It's the Order Confirmation page I wan't to tidy up.

Thanks again for a solution for the payment method problem.

Regards,

Julian

Share this post


Link to post
Share on other sites
Posted (edited)

yes I mixed up shipping and payment that's all should have been includes\languages\[language]\modules\shipping\[shipping method].php

he managed to post before I because a picture saves a thousand words

Edited by 241

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P


Support The Project
Documentation/Knowledgebase/Discussions
 

Share this post


Link to post
Share on other sites

most likely a cached result try on a new order or round trip back to shipping and choose a different shipping method


No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P


Support The Project
Documentation/Knowledgebase/Discussions
 

Share this post


Link to post
Share on other sites

Hi All,

Thanks 241 for all the advice - the date changes, etc. much appreciated - i remember having an issue with getting GBP as the default currency that involved that file.

The () issue is still ongoing - it affects the Order Confirmation page.

Actconic's suggestion lead to a dead end - my checkout_shipping.php is completely different . I have pasted my version below.

Everything else works ok - right through to a sucessful Worldpay test transactions - though that has thrown up another issue - no emails going to the customer or the seller! - you may well find a new topic started later if I cant find a solution!

In the meantime just need to tidy up the () issue.

Thanks as ever.

Julian

 

<?php
/*
  $Id$

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2002 osCommerce

  Released under the GNU General Public License
*/

define('NAVBAR_TITLE_1', 'Checkout');
define('NAVBAR_TITLE_2', 'Shipping Method');

define('HEADING_TITLE', 'Delivery Information');

define('TABLE_HEADING_SHIPPING_ADDRESS', 'Shipping Address');
define('TEXT_CHOOSE_SHIPPING_DESTINATION', 'Please choose from your address book where you would like the items to be delivered to.');
define('TITLE_SHIPPING_ADDRESS', 'Shipping Address:');

define('TABLE_HEADING_SHIPPING_METHOD', 'Shipping Method');
define('TEXT_CHOOSE_SHIPPING_METHOD', 'Please select the preferred shipping method to use on this order.');
define('TITLE_PLEASE_SELECT', 'Please Select');
define('TEXT_ENTER_SHIPPING_INFORMATION', 'This is currently the only shipping method available to use on this order.');

define('TABLE_HEADING_COMMENTS', 'Add Comments About Your Order');

define('TITLE_CONTINUE_CHECKOUT_PROCEDURE', 'Continue Checkout Procedure');
define('TEXT_CONTINUE_CHECKOUT_PROCEDURE', 'to select the preferred payment method.');

define('ERROR_NO_SHIPPING_AVAILABLE_TO_SHIPPING_ADDRESS', 'Shipping is currently not available for the selected shipping address. Please select or create a new shipping address to use with your purchase.');

 

Share this post


Link to post
Share on other sites

Hi,

Ignore my last post, brain fart moment!

I re-checked the checkout_shipping.php file on the server rathet than through admin>module and did find the code. Made the change flagged by Artcoinc and it has cured the problem, no more () on the page.

Thanks again for all the help - very much appreciated.

Having got further through the payment process another sendmail related issue has arisen. I have started a seperate topic if any of you might be able to help.

Regards,

Julian

Share this post


Link to post
Share on other sites

Lots or response. But did you check the simple thing? After clicking the 'Install' button you then need to click 'Edit' and set 'false' to 'true' to use the modules.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×