If this is your first visit, check our documentation. To post, register or login.
Forums / Configuring the Zen Cart Admin / Built-in Shipping and Payment Modules / Payment methods not showing up after Install.

Payment methods not showing up after Install.

Started by ws_cwot on 22 Jul 2023, 2:24 PM · Views: 2,553

Results 1 to 9 of 9
22 Jul 2023, 2:24 PM
#1
ws_cwot avatar

ws_cwot

New Zenner

Join Date:
Jul 2023
Posts:
5
Plugin Contributions:
0

Post #1 by ws_cwot

Hi

I just installed ZenCart yesterday, newest version from the site and I verified that everything matches the requested technical specifics. The only thing that was a potential issue at the install was the Git7/PHP compatibility (which does not appear to be used for either the payment modules or anything that I entend to use the store for) or whatever that is named.

Attachment 20346

The payment modules which I have verified to be enabled (with the green light by them) multiple times are not showing up. This screenshot is from a product test, as I've made 2 test products and this is the same consistent issue. The only thing that has been done with the store since I installed it is attempt to set up the tests for payment modules. I'm thinking either something was missed during the original installation, or files were somehow deleted when I installed the payment extension for Stripe. However I have no idea how to determine that.

Thank you

22 Jul 2023, 2:41 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,144
Plugin Contributions:
56

Post #2 by lat9

What payment methods are installed (with the green-light)?

If you (for testing purposes) also enable the moneyorder payment method, does that show up?

22 Jul 2023, 2:46 PM
#3
ws_cwot avatar

ws_cwot

New Zenner

Join Date:
Jul 2023
Posts:
5
Plugin Contributions:
0

Post #3 by ws_cwot

lat9:

What payment methods are installed (with the green-light)?

If you (for testing purposes) also enable the moneyorder payment method, does that show up?

Attachment 20347

The only two payment methods I'm intending to use are Stripe & the "Check/Money order" option which I will likely want to see if I can rename what the customers see to just offline payment method. I've changed the sort order to 1 & 2 but it still doesn't fix the issue.

Stripe is in test mode and that should at least show up.

22 Jul 2023, 8:49 PM
#4
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,819
Plugin Contributions:
24

Post #4 by balihr

From the screenshot, I'd say it looks like a partial blank page. Scroll down and see "Working with Debug Logs". My suggestion is to clear ALL debug logs, then go to the frontend to reproduce the error and then post the contents of the newly created log here if needed.

My site - Pro ZC Help
My portfolio | My plugins

22 Jul 2023, 11:05 PM
#5
ws_cwot avatar

ws_cwot

New Zenner

Join Date:
Jul 2023
Posts:
5
Plugin Contributions:
0

Post #5 by ws_cwot

balihr:

From the screenshot, I'd say it looks like a partial blank page. Scroll down and see "Working with Debug Logs". My suggestion is to clear ALL debug logs, then go to the frontend to reproduce the error and then post the contents of the newly created log here if needed.

All the debug logs say the same thing (as again the only thing done with this so far is to attempt to get the payment modules online)

--> PHP Fatal error: Uncaught Error: Undefined constant "TABLE_HEADING_PAYMENT_METHOD" in /public_html/webshop/includes/templates/responsive_classic/templates/tpl_checkout_payment_default.php:88

which yeah I think is either a problem with the php in the files, or I'm missing a file or two from the install.

22 Jul 2023, 11:15 PM
#6
ws_cwot avatar

ws_cwot

New Zenner

Join Date:
Jul 2023
Posts:
5
Plugin Contributions:
0

Post #6 by ws_cwot

<?php
/**
 * Page Template
 *
 * Loaded automatically by index.php?main_page=checkout_payment.<br />
 * Displays the allowed payment modules, for selection by customer.
 *
 * @copyright Copyright 2003-2020 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license [URL]http://www.zen-cart.com/license/2_0.txt[/URL] GNU Public License V2.0
 * @version $Id: DrByte 2020 Oct 29 Modified in v1.5.7a $
 */
?>
<?php echo $payment_modules->javascript_validation(); ?>
<div class="centerColumn" id="checkoutPayment">
<?php echo zen_draw_form('checkout_payment', zen_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post'); ?>
<?php echo zen_draw_hidden_field('action', 'submit'); ?>

<h1 id="checkoutPaymentHeading"><?php echo HEADING_TITLE; ?></h1>

<?php if ($messageStack->size('redemptions') > 0) echo $messageStack->output('redemptions'); ?>
<?php if ($messageStack->size('checkout') > 0) echo $messageStack->output('checkout'); ?>
<?php if ($messageStack->size('checkout_payment') > 0) echo $messageStack->output('checkout_payment'); ?>

<?php // ** BEGIN PAYPAL EXPRESS CHECKOUT **
      if (!$payment_modules->in_special_checkout()) {
      // ** END PAYPAL EXPRESS CHECKOUT ** ?>
<h2 id="checkoutPaymentHeadingAddress"><?php echo TITLE_BILLING_ADDRESS; ?></h2>

<div id="checkoutBillto" class="floatingBox back">
<?php if (MAX_ADDRESS_BOOK_ENTRIES >= 2) { ?>
<div class="buttonRow forward"><?php echo '<a href="' . zen_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_CHANGE_ADDRESS, BUTTON_CHANGE_ADDRESS_ALT) . '</a>'; ?></div>
<?php } ?>
<address><?php echo zen_address_label($_SESSION['customer_id'], $_SESSION['billto'], true, ' ', '<br />'); ?></address>
</div>

<div class="floatingBox important forward"><?php echo TEXT_SELECTED_BILLING_DESTINATION; ?></div>
<br class="clearBoth">
<br>
<?php // ** BEGIN PAYPAL EXPRESS CHECKOUT **
      }
      // ** END PAYPAL EXPRESS CHECKOUT ** ?>

<fieldset id="checkoutOrderTotals">
<legend id="checkoutPaymentHeadingTotal"><?php echo TEXT_YOUR_TOTAL; ?></legend>
<?php
  if (MODULE_ORDER_TOTAL_INSTALLED) {
    $order_totals = $order_total_modules->process();
?>
<?php $order_total_modules->output(); ?>
<?php
  }
?>
</fieldset>

<?php
  $selection =  $order_total_modules->credit_selection();
  if (sizeof($selection)>0) {
    for ($i=0, $n=sizeof($selection); $i<$n; $i++) {
      if (isset($_GET['credit_class_error_code']) && ($_GET['credit_class_error_code'] == (isset($selection[$i]['id'])) ? $selection[$i]['id'] : 0)) {
?>
<div class="messageStackError"><?php echo zen_output_string_protected($_GET['credit_class_error']); ?></div>

<?php
      }
      for ($j=0, $n2=(isset($selection[$i]['fields']) ? sizeof($selection[$i]['fields']) : 0); $j<$n2; $j++) {
?>
<fieldset>
<legend><?php echo $selection[$i]['module']; ?></legend>
<?php echo $selection[$i]['redeem_instructions']; ?>
<div class="gvBal larger"><?php echo (isset($selection[$i]['checkbox'])) ? $selection[$i]['checkbox'] : ''; ?></div>
<label class="inputLabel"<?php echo ($selection[$i]['fields'][$j]['tag']) ? ' for="'.$selection[$i]['fields'][$j]['tag'].'"': ''; ?>><?php echo $selection[$i]['fields'][$j]['title']; ?></label>
<?php echo $selection[$i]['fields'][$j]['field']; ?>
</fieldset>
<?php
      }
    }
?>

<?php
    }
?>

<?php // ** BEGIN PAYPAL EXPRESS CHECKOUT **
      if (!$payment_modules->in_special_checkout()) {
      // ** END PAYPAL EXPRESS CHECKOUT ** ?>
<fieldset class="payment">
<legend><?php echo TABLE_HEADING_PAYMENT_METHOD; ?></legend>

<?php
  if (SHOW_ACCEPTED_CREDIT_CARDS != '0') {
?>

<?php
    if (SHOW_ACCEPTED_CREDIT_CARDS == '1') {
      echo TEXT_ACCEPTED_CREDIT_CARDS . zen_get_cc_enabled();
    }
    if (SHOW_ACCEPTED_CREDIT_CARDS == '2') {
      echo TEXT_ACCEPTED_CREDIT_CARDS . zen_get_cc_enabled('IMAGE_');
    }
?>
<br class="clearBoth" />
<?php } ?>

<?php
  $selection = $payment_modules->selection();

  if (sizeof($selection) > 1) {
?>
<p class="important"><?php echo TEXT_SELECT_PAYMENT_METHOD; ?></p>
<?php
  } elseif (sizeof($selection) == 0) {
?>
<p class="important"><?php echo TEXT_NO_PAYMENT_OPTIONS_AVAILABLE; ?></p>

<?php
  }
?>

<?php
  $radio_buttons = 0;
  for ($i=0, $n=sizeof($selection); $i<$n; $i++) {
?>
<?php
    if (sizeof($selection) > 1) {
        if (empty($selection[$i]['noradio'])) {
 ?>
<?php echo zen_draw_radio_field('payment', $selection[$i]['id'], ($selection[$i]['id'] == (isset($_SESSION['payment']) ? $_SESSION['payment'] : '')), 'id="pmt-'.$selection[$i]['id'].'"'); ?>
<?php   } ?>
<?php
    } else {

?>
<?php echo zen_draw_hidden_field('payment', $selection[$i]['id'], 'id="pmt-'.$selection[$i]['id'].'"'); ?>
<?php
    }
?>
<label for="pmt-<?php echo $selection[$i]['id']; ?>" class="radioButtonLabel"><?php echo $selection[$i]['module']; ?></label>

<?php
    if (defined('MODULE_ORDER_TOTAL_COD_STATUS') && MODULE_ORDER_TOTAL_COD_STATUS == 'true' and $selection[$i]['id'] == 'cod') {
?>
<div class="alert"><?php echo TEXT_INFO_COD_FEES; ?></div>
<?php
    } else {
      // echo 'WRONG ' . $selection[$i]['id'];
?>
<?php
    }
?>
<br class="clearBoth" />

<?php
    if (isset($selection[$i]['error'])) {
?>
    <div><?php echo $selection[$i]['error']; ?></div>

<?php
    } elseif (isset($selection[$i]['fields']) && is_array($selection[$i]['fields'])) {
?>

<div class="ccinfo">
<?php
      for ($j=0, $n2=sizeof($selection[$i]['fields']); $j<$n2; $j++) {
?>
<label <?php echo (isset($selection[$i]['fields'][$j]['tag']) ? 'for="'.$selection[$i]['fields'][$j]['tag'] . '" ' : ''); ?>class="inputLabelPayment"><?php echo isset($selection[$i]['fields'][$j]['title']) ? $selection[$i]['fields'][$j]['title'] : ''; ?></label><?php echo $selection[$i]['fields'][$j]['field']; ?>
<br class="clearBoth" />
<?php
      }
?>
</div>
<br class="clearBoth" />
<?php
    }
    $radio_buttons++;
?>
<br class="clearBoth" />
<?php
  }
?>

</fieldset>
<?php // ** BEGIN PAYPAL EXPRESS CHECKOUT **
      } else {
        ?><input type="hidden" name="payment" value="<?php echo $_SESSION['payment']; ?>" /><?php
      }
      // ** END PAYPAL EXPRESS CHECKOUT ** ?>
<fieldset>
<legend><?php echo TABLE_HEADING_COMMENTS; ?></legend>
<?php echo zen_draw_textarea_field('comments', '45', '3', (isset($comments) ? $comments : ''), 'aria-label="' . TABLE_HEADING_COMMENTS . '"'); ?>
</fieldset>

<?php
  if (DISPLAY_CONDITIONS_ON_CHECKOUT == 'true') {
?>
<fieldset>
<legend><?php echo TABLE_HEADING_CONDITIONS; ?></legend>
<div><?php echo TEXT_CONDITIONS_DESCRIPTION;?></div>
<?php echo  zen_draw_checkbox_field('conditions', '1', (isset($_SESSION['conditions']) && ($_SESSION['conditions'] === '1')), 'id="conditions" required  oninput="this.setCustomValidity(\'\')" oninvalid="this.setCustomValidity(\'' . ERROR_CONDITIONS_NOT_ACCEPTED . '\')"');?>

<label class="checkboxLabel" for="conditions"><?php echo TEXT_CONDITIONS_CONFIRM; ?></label>
</fieldset>
<?php
  }
?>

<div class="buttonRow forward" id="paymentSubmit"><?php echo zen_image_submit(BUTTON_IMAGE_CONTINUE_CHECKOUT, BUTTON_CONTINUE_ALT, 'onclick="submitFunction('.zen_user_has_gv_account($_SESSION['customer_id']).','.$order->info['total'].')"'); ?></div>

<div class="buttonRow back"><?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE . '<br />' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></div>

</form>
</div>

the missing file is something with the stripe extension, however as you can see by the code I think whoever made this has files in this for paypal. Running some other tests now.

22 Jul 2023, 11:59 PM
#7
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,144
Plugin Contributions:
56

Post #7 by lat9

Zen Cart 1.5.8 replaced the TABLE_HEADING_PAYMENT_METHOD constant with HEADING_PAYMENT_METHOD.. Since you've got a zc157 version of tpl_checkout_payment_default.php in the responsive_classic/templates directory, that's where the source of the error is.

Either discontinue use of that zc157 version of the template for responsive_classic (the site will default to use the template file in template_default) or change the name of that constant to match what's now in Zen Cart 1.5.8.

23 Jul 2023, 5:01 PM
#8
ws_cwot avatar

ws_cwot

New Zenner

Join Date:
Jul 2023
Posts:
5
Plugin Contributions:
0

Post #8 by ws_cwot

lat9:

Zen Cart 1.5.8 replaced the TABLE_HEADING_PAYMENT_METHOD constant with HEADING_PAYMENT_METHOD.. Since you've got a zc157 version of tpl_checkout_payment_default.php in the responsive_classic/templates directory, that's where the source of the error is.

Either discontinue use of that zc157 version of the template for responsive_classic (the site will default to use the template file in template_default) or change the name of that constant to match what's now in Zen Cart 1.5.8.

Okay so this stripe extension isn't compatible with zc157. So by changing the name of the constant, do I need to rename the file or is there something within the PHP that I must change?

23 Jul 2023, 6:18 PM
#9
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,819
Plugin Contributions:
24

Post #9 by balihr

No, you probably just installed the 1.5.7 version of the plugin to your 1.5.8 site.

If you look at the stripe plugin, it comes with 2 folders, one for 1.5.7 and the other for 1.5.8. The one for 1.5.8 does not have "includes/templates/***/templates/tpl_checkout_payment_default.php, whilst the 1.5.7 version does. If you uploaded the 1.5.7 version, your site is now using the mentioned file which tries to echo an constant that doesn't exist in 1.5.8.
Since you're using responsive_classic template, simply do what lat9 suggested

Either discontinue use of that zc157 version of the template for responsive_classic (the site will default to use the template file in template_default)
In other words, delete your "includes/templates/responsive_classic/templates/tpl_checkout_payment_default.php" and it should work fine.

My site - Pro ZC Help
My portfolio | My plugins