Summary for anyone else wanting to use this plug-in with 2.1.0 and bootstrap:
(the blank invoice was down to my own misunderstanding, but the new version doesn't throw errors)
edit for includes/templates/bootstrap/templates/tpl_account_default.php
Code:
<?php
/**
* Page Template
*
* BOOTSTRAP v3.7.1
*
* Loaded automatically by index.php?main_page=account.<br />
* Displays previous orders and options to change various Customer Account settings
*
* @package templateSystem
* @copyright Copyright 2003-2016 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: Author: DrByte Fri Jan 8 00:33:36 2016 -0500 Modified in v1.5.5 $
*/
?>
<div id="accountDefault" class="centerColumn">
<h1 id="accountDefault-pageHeading" class="pageHeading"><?= HEADING_TITLE ?></h1>
<?php
if ($messageStack->size('account') > 0) {
echo $messageStack->output('account');
}
?>
<div class="card-deck mb-3">
<!--bof my account card links-->
<div id="myAccount-card" class="card">
<h4 id="myAccount-card-header" class="card-header"><?= MY_ACCOUNT_TITLE ?></h4>
<div id="myAccount-card-body" class="card-body p-3">
<ul id="myAccount-list-group" class="list-group list-group-flush">
<li class="list-group-item">
<?= zca_button_link(zen_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL'), MY_ACCOUNT_INFORMATION) ?>
</li>
<li class="list-group-item">
<?= zca_button_link(zen_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL'), MY_ACCOUNT_ADDRESS_BOOK) ?>
</li>
<li class="list-group-item">
<?= zca_button_link(zen_href_link(FILENAME_ACCOUNT_PASSWORD, '', 'SSL'), MY_ACCOUNT_PASSWORD) ?>
</li>
</ul>
</div>
</div>
<!--eof my account card links-->
<?php
if ((int)ACCOUNT_NEWSLETTER_STATUS > 0 || CUSTOMERS_PRODUCTS_NOTIFICATION_STATUS !== '0') {
?>
<!--bof email notifications card links-->
<div id="emailNotifications-card" class="card">
<h4 id="emailNotifications-card-header" class="card-header"><?= EMAIL_NOTIFICATIONS_TITLE ?></h4>
<div id="emailNotifications-card-body" class="card-body p-3">
<ul id="emailNotifications-list-group" class="list-group list-group-flush">
<?php
if ((int)ACCOUNT_NEWSLETTER_STATUS > 0) {
?>
<li class="list-group-item">
<?= zca_button_link(zen_href_link(FILENAME_ACCOUNT_NEWSLETTERS, '', 'SSL'), EMAIL_NOTIFICATIONS_NEWSLETTERS) ?>
</li>
<?php
} //endif newsletter unsubscribe
if (CUSTOMERS_PRODUCTS_NOTIFICATION_STATUS === '1') {
?>
<li class="list-group-item">
<?= zca_button_link(zen_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'SSL'), EMAIL_NOTIFICATIONS_PRODUCTS) ?>
</li>
<?php
} //endif product notification
?>
</ul>
</div>
</div>
<!--bof email notifications card links-->
<?php
} // endif don't show unsubscribe or notification
?>
</div>
<?php
// only show when there is a GV balance
if ($customer_has_gv_balance) {
require $template->get_template_dir('tpl_modules_send_or_spend.php', DIR_WS_TEMPLATE, $current_page_base, 'templates') . '/tpl_modules_send_or_spend.php';
}
if (count($ordersArray) !== 0) {
?>
<!--bof previous orders card -->
<div id="previousOrders-card" class="card mb-3">
<h4 id="previousOrders-card-header" class="card-header"><?= OVERVIEW_PREVIOUS_ORDERS ?></h4>
<div id="previousOrders-card-body" class="card-body p-3">
<div id="previousOrders-helpLink" class="helpLink text-right p-3">
<a href="<?= zen_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL') ?>"><?= OVERVIEW_SHOW_ALL_ORDERS ?></a>
</div>
<div class="card-deck">
<?php
foreach ($ordersArray as $orders) {
$order_link = zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $orders['orders_id'], 'SSL');
?>
<div class="card">
<div class="card-header text-center">
<a class="orderIdCell" href="<?= $order_link ?>"><?= TEXT_NUMBER_SYMBOL . $orders['orders_id'] ?></a>
</div>
<div class="card-body text-center">
<ul class="list-group list-group-flush">
<li class="list-group-item dateCell border-0 p-1"><?= zen_date_short($orders['date_purchased']) ?></li>
<li class="list-group-item shipToCell border-0 p-1"><?= zen_output_string_protected($orders['order_name']) . '<br>' . $orders['order_country'] ?></li>
<li class="list-group-item statusCell border-0 p-1"><?= $orders['orders_status_name'] ?></li>
<li class="list-group-item border-0 p-1"><?= $orders['order_total'] ?></li>
</ul>
</div>
<div class="card-footer text-center">
<?= zca_button_link($order_link, BUTTON_VIEW_SMALL_ALT, 'button_view') ?>
<br>
<?= '<a href="' . FILENAME_INVOICE . '.php?oID=' . $orders['orders_id'] . '" target="_blank">' . zen_image_button(BUTTON_IMAGE_INVOICE_SMALL, BUTTON_INVOICE_SMALL_ALT) . '</a>' . ' '; ?>
</div>
</div>
<?php
}
?>
</div>
</div>
</div>
<!--eof previous orders card -->
<?php
}
?>
</div>
Edit for includes/templates/bootstrap/templates/tpl_account_history_default.php
Code:
<?php
/**
* Page Template
*
* BOOTSTRAP v3.5.0
*
* Loaded automatically by index.php?main_page=account_history.<br />
* Displays all customers previous orders
*
* @package templateSystem
* @copyright Copyright 2003-2016 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: Author: DrByte Sat Jan 9 13:13:41 2016 -0500 Modified in v1.5.5 $
*/
?>
<div id="accountHistoryDefault" class="centerColumn">
<h1 id="accountHistoryDefault-pageHeading" class="pageHeading"><?php echo HEADING_TITLE; ?></h1>
<?php
if ($accountHasHistory === true) {
$page_parameter = (isset($_GET['page'])) ? ('page=' . (int)$_GET['page'] . '&') : '';
foreach ($accountHistory as $history) {
?>
<!--bof order history card-->
<div id="order<?php echo $history['orders_id']; ?>-card" class="card mb-3">
<h4 id="order<?php echo $history['orders_id']; ?>-card-header" class="card-header"><?php echo TEXT_ORDER_NUMBER . $history['orders_id']; ?></h4>
<div id="order<?php echo $history['orders_id']; ?>-card-body" class="card-body p-3">
<div class="row">
<div class="col-sm text-right">
<?php echo TEXT_ORDER_STATUS . $history['orders_status_name']; ?>
</div>
</div>
<div class="row">
<div class="col-sm">
<?php echo '<strong>' . TEXT_ORDER_DATE . '</strong> ' . zen_date_long($history['date_purchased']); ?>
</div>
<div class="col-sm">
<?php echo '<strong>' . TEXT_ORDER_PRODUCTS . '</strong> ' . $history['product_count']; ?>
</div>
</div>
<div class="row">
<div class="col-sm">
<?php echo '<strong>' . $history['order_type'] . '</strong> ' . zen_output_string_protected($history['order_name']); ?>
</div>
<div class="col-sm">
<?php echo '<strong>' . TEXT_ORDER_COST . '</strong> ' . strip_tags($history['order_total']); ?>
</div>
</div>
<div id="order<?php echo $history['orders_id']; ?>-btn-toolbar" class="btn-toolbar justify-content-end my-3" role="toolbar">
<?php echo zca_button_link(zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, $page_parameter . 'order_id=' . $history['orders_id'], 'SSL'), BUTTON_VIEW_SMALL_ALT, 'button_view'); ?>
</div>
</div>
</div>
<!--eof order history card-->
<!-- Invoice -->
<div class="content forward"><?php echo '<a href="' . FILENAME_INVOICE . '.php?oID=' . $history['orders_id'] . '">' . zen_image_button(BUTTON_IMAGE_INVOICE_SMALL, BUTTON_INVOICE_SMALL_ALT) . '</a>'; ?></div>
<?php
}
?>
<div id="accountHistoryDefault-bottomRow" class="row">
<div id="accountHistoryDefault-bottomNumber" class="bottomNumber col-sm">
<?php echo $history_split->display_count(TEXT_DISPLAY_NUMBER_OF_ORDERS); ?>
</div>
<div id="accountHistoryDefault-bottomLinks" class="bottomLinks col-sm">
<?php echo TEXT_RESULT_PAGE . $history_split->display_links($max_display_page_links, zen_get_all_get_params(['page', 'info', 'x', 'y', 'main_page']), $paginateAsUL); ?>
</div>
</div>
<?php
} else {
?>
<div id="noAccountHistoryDefault" class="centerColumn">
<div id="noAccountHistoryDefault-content" class="content">
<?php echo TEXT_NO_PURCHASES; ?>
</div>
</div>
<?php
}
?>
<div id="accountHistoryDefault-btn-toolbar" class="btn-toolbar my-3" role="toolbar">
<?php echo zca_button_link(zen_href_link(FILENAME_ACCOUNT, '', 'SSL'), BUTTON_BACK_ALT, 'button_back'); ?>
</div>
</div>
Bookmarks