Skip to content

Commit

Permalink
#199: Correct PHP Notice for non-CSS buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
lat9 committed Jun 5, 2019
1 parent c419146 commit d577273
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion docs/one_page_checkout/readme.html
Expand Up @@ -86,7 +86,7 @@

<body>
<h1>One-Page Checkout &hellip; with Guest &hellip; <span class="smaller">for Zen Cart v1.5.5b (and later)</span></h1>
<h3>Version 2.1.0 by lat9</h3>
<h3>Version 2.1.1 by lat9</h3>
<h3>Copyright &copy; 2013-2019 <a href="https://vinosdefrutastropicales.com" target="_blank">Vinos de Frutas Tropicales</a>. All rights reserved.</h3>
<p>Released under the General Public License (see the file named <code class="no-pad">license.txt</code> in the plugin's distribution for full details). This script is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p>
<hr />
Expand Down Expand Up @@ -699,6 +699,13 @@ <h3>Template-specific &quot;jscript_framework.php&quot; is Required</h3>
<div id="changes">
<p>You can view the details of these changes on the plugin's <a href="https://github.com/lat9/one_page_checkout/issues" target="_blank">GitHub repository.</a> <span class="template-changed">Changes to the plugin's default templates are identified in this color</span>; remember to merge those changes with any template-override version you might have created! Additions are identified by <span class="added">this</span> color.</p>
<ul>
<li>v2.1.1, 2019-06-xx:<ul>
<li>BUGFIX: PHP Notice &quot;thrown&quot; when the site <b><i>doesn't use</i></b> CSS buttons.</li>
<li>The following files were affected:<ol>
<li><span class="template-changed">/includes/templates/template_default/templates/tpl_modules_opc_credit_selections.php</span></li>
<li>/YOUR_ADMIN/includes/init_includes/init_checkout_one.php</li>
</ol></li>
</ul></li>
<li>v2.1.0, 2019-04-07:<ul>
<li>BUGFIX: Return the expected value from <code class="no-pad">OnePageCheckout::startGuestOnePageCheckout</code>.</li>
<li>BUGFIX: Correct conditional in the <code class="no-pad">checkout_one</code> page's header processing, causing PHP warnings.</li>
Expand Down
Expand Up @@ -35,6 +35,7 @@
// a jQuery event handler binds. When CSS buttons are used, the "secondary class" input must be used; otherwise,
// the class is submitted to the function as part of the to-be-created parameter list.
//
$ot_class = str_replace('ot_', '', $current_selection['id']);
if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes') {
$secondary_class = 'opc-cc-submit';
$additional_parms = '';
Expand All @@ -43,7 +44,6 @@
$additional_parms = 'name="apply_' . $ot_class . '"' . ' class="opc-cc-submit"';
}

$ot_class = str_replace('ot_', '', $current_selection['id']);
foreach ($current_selection['fields'] as $current_field) {
?>
<div class="checkoutOne<?php echo ucfirst($ot_class); ?>">
Expand Down

0 comments on commit d577273

Please sign in to comment.