Skip to content

Commit

Permalink
font awesome formatting and syntax updates
Browse files Browse the repository at this point in the history
  • Loading branch information
webchills committed Mar 20, 2024
1 parent 107bce1 commit fac58ff
Show file tree
Hide file tree
Showing 10 changed files with 429 additions and 368 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
// Order Totals Display
define('TEXT_ADD_ORDER_TOTAL', 'Add ');
define('TEXT_CHOOSE_SHIPPING_MODULE', 'Choose a shipping module: ');
if (!defined('TEXT_COMMAND_TO_DELETE_CURRENT_COUPON_FROM_ORDER')) define('TEXT_COMMAND_TO_DELETE_CURRENT_COUPON_FROM_ORDER', 'REMOVE');
define('TEXT_COMMAND_TO_DELETE_CURRENT_COUPON_FROM_ORDER', 'REMOVE');

// Add a Product
define('TEXT_ADD_NEW_PRODUCT', 'Add Product');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
// Order Totals Display
define('TEXT_ADD_ORDER_TOTAL', 'Hinzufügen ');
define('TEXT_CHOOSE_SHIPPING_MODULE', 'Wählen Sie eine Versandart: ');
if (!defined('TEXT_COMMAND_TO_DELETE_CURRENT_COUPON_FROM_ORDER')) define('TEXT_COMMAND_TO_DELETE_CURRENT_COUPON_FROM_ORDER', 'REMOVE');
define('TEXT_COMMAND_TO_DELETE_CURRENT_COUPON_FROM_ORDER', 'REMOVE');
// Add a Product
define('TEXT_ADD_NEW_PRODUCT', 'Artikel hinzufügen');
define('ADDPRODUCT_TEXT_CATEGORY_CONFIRM', 'OK');
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
/**
* @package Edit Orders for Zen Cart German
* Edit Orders plugin by Cindy Merkin a.k.a. lat9 (cindy@vinosdefrutastropicales.com)
* Copyright (c) 2017-2022 Vinos de Frutas Tropicales
* Copyright (c) 2017-2024 Vinos de Frutas Tropicales
* @copyright Copyright 2003-2022 Zen Cart Development Team
* Zen Cart German Version - www.zen-cart-pro.at
* @copyright Portions Copyright 2003 osCommerce
* @license https://www.zen-cart-pro.at/license/3_0.txt GNU General Public License V3.0
* @version $Id: eo_add_prdct_action_processing.php 2022-06-10 08:21:16Z webchills $
* @version $Id: eo_add_prdct_action_processing.php 2024-03-20 07:21:16Z webchills $
*/
// -----
// Prior to EO v4.6.0, this code was in-line in the main /admin/edit_orders.php script. Now required by
// that script in global context for its 'add_prdct' action.
//
$redirect_required = false;
if (!zen_not_null($step)) {
if (empty($step)) {
$step = 1;
}
$eo->eoLog(
Expand Down Expand Up @@ -42,7 +42,7 @@
}

// Retrieve the information for the new product
$attributes = (isset($_POST['id'])) ? zen_db_prepare_input($_POST['id']) : [];
$attributes = zen_db_prepare_input($_POST['id'] ?? []);
$new_product = eo_get_new_product(
$add_product_products_id,
$add_product_quantity,
Expand All @@ -66,7 +66,7 @@

// Remove the low order and/or cod fees (will automatically repopulate if needed)
foreach ($order->totals as $key => $total) {
if ($total['class'] == 'ot_loworderfee' || $total['class'] == 'ot_cod_fee') {
if ($total['class'] === 'ot_loworderfee' || $total['class'] === 'ot_cod_fee') {
// Update the information in the order
$total['title'] = '';
$total['value'] = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
/**
* @package Edit Orders for Zen Cart German
* Edit Orders plugin by Cindy Merkin a.k.a. lat9 (cindy@vinosdefrutastropicales.com)
* Copyright (c) 2017-2022 Vinos de Frutas Tropicales
* Copyright (c) 2017-2024 Vinos de Frutas Tropicales
* @copyright Copyright 2003-2022 Zen Cart Development Team
* Zen Cart German Version - www.zen-cart-pro.at
* @copyright Portions Copyright 2003 osCommerce
* @license https://www.zen-cart-pro.at/license/3_0.txt GNU General Public License V3.0
* @version $Id: eo_common_address_format.php 2022-06-10 08:21:16Z webchills $
* @version $Id: eo_common_address_format.php 2024-03-20 08:21:16Z webchills $
*/
//
// This module is loaded in global scope by /admin/includes/modules/edit_orders/eo_edit_action_display.php.
//
// The following variables are set for the module's use:
//
// $address_icon ..... The name of the icon associated with the address' information.
// $address_icon ..... The name of the FA icon associated with the address' information.
// $address_label .... The label, e.g. "Customer" to associate with the address information.
// $address_name ..... The specific address, e.g. 'customer' or 'billing', that is being displayed. This is
// used to create unique form-field names for the three variants of addresses.
Expand All @@ -23,85 +23,92 @@
// $address_notifier . The notification to be raised at the end of EO's standard address elements.
//
?>
<div role="group" aria-labelledby="sr-<?php echo $address_name; ?>">
<div role="group" aria-labelledby="sr-<?= $address_name ?>">
<?php
// -----
// Add a hidden field containing the JSON-encoded version of the currently-displayed address. Used
// on an update_order action to see if any of the addresses have changed.
//
echo zen_draw_hidden_field('existing-' . $address_name, $eo->arrayImplode($address_fields));
?>
<table class="table">
<tr>
<td aria-hidden="true"><?php echo zen_image(DIR_WS_IMAGES . $address_icon, $address_label); ?></td>
<td class="eo-label" id="sr-<?php echo $address_name; ?>" role="heading" aria-level="2"><?php echo $address_label; ?></td>
<td aria-hidden="true"><i class="fa-2x <?= $address_icon ?>"></i></td>
<td class="eo-label" id="sr-<?= $address_name ?>" role="heading" aria-level="2"><?= $address_label ?></td>
</tr>
<tr>
<td class="eo-label"><label for="update_<?php echo $address_name; ?>_name"><?php echo ENTRY_CUSTOMER_NAME; ?></label>:&nbsp;</td>
<td><input name="update_<?php echo $address_name; ?>_name" size="45" value="<?php echo zen_output_string_protected($address_fields['name']); ?>" <?php echo $max_name_length; ?> id="update_<?php echo $address_name; ?>_name"></td>
<td class="eo-label"><label for="update_<?= $address_name ?>_name"><?= ENTRY_CUSTOMER_NAME ?></label>:&nbsp;</td>
<td><input name="update_<?= $address_name ?>_name" size="45" value="<?= zen_output_string_protected($address_fields['name']) ?>" <?= $max_name_length ?> id="update_<?= $address_name ?>_name"></td>
</tr>

<tr>
<td class="eo-label"><label for="update_<?php echo $address_name; ?>_company"><?php echo ENTRY_CUSTOMER_COMPANY; ?></label>:&nbsp;</td>
<td><input name="update_<?php echo $address_name; ?>_company" size="45" value="<?php echo zen_output_string_protected($address_fields['company']); ?>" <?php echo $max_company_length; ?> id="update_<?php echo $address_name; ?>_company"></td>
<td class="eo-label"><label for="update_<?= $address_name ?>_company"><?= ENTRY_CUSTOMER_COMPANY ?></label>:&nbsp;</td>
<td><input name="update_<?= $address_name ?>_company" size="45" value="<?= zen_output_string_protected($address_fields['company']) ?>" <?= $max_company_length ?> id="update_<?= $address_name ?>_company"></td>
</tr>

<tr>
<td class="eo-label"><label for="update_<?php echo $address_name; ?>_address"><?php echo ENTRY_CUSTOMER_ADDRESS; ?></label>:&nbsp;</td>
<td><input name="update_<?php echo $address_name; ?>_street_address" size="45" value="<?php echo zen_output_string_protected($address_fields['street_address']); ?>" <?php echo $max_street_address_length; ?> id="update_<?php echo $address_name; ?>_address"></td>
<td class="eo-label"><label for="update_<?= $address_name ?>_address"><?= ENTRY_CUSTOMER_ADDRESS ?></label>:&nbsp;</td>
<td><input name="update_<?= $address_name ?>_street_address" size="45" value="<?= zen_output_string_protected($address_fields['street_address']) ?>" <?= $max_street_address_length ?> id="update_<?= $address_name ?>_address"></td>
</tr>

<tr>
<td class="eo-label"><label for="update_<?php echo $address_name; ?>_suburb"><?php echo ENTRY_CUSTOMER_SUBURB; ?></label>:&nbsp;</td>
<td><input name="update_<?php echo $address_name; ?>_suburb" size="45" value="<?php echo zen_output_string_protected($address_fields['suburb']); ?>" <?php echo $max_suburb_length; ?> id="update_<?php echo $address_name; ?>_suburb"></td>
<td class="eo-label"><label for="update_<?= $address_name ?>_suburb"><?= ENTRY_CUSTOMER_SUBURB ?></label>:&nbsp;</td>
<td><input name="update_<?= $address_name ?>_suburb" size="45" value="<?= zen_output_string_protected($address_fields['suburb']) ?>" <?= $max_suburb_length ?> id="update_<?= $address_name ?>_suburb"></td>
</tr>

<tr>
<td class="eo-label"><label for="update_<?php echo $address_name; ?>_city"><?php echo ENTRY_CUSTOMER_CITY; ?></label>:&nbsp;</td>
<td><input name="update_<?php echo $address_name; ?>_city" size="45" value="<?php echo zen_output_string_protected($address_fields['city']); ?>" <?php echo $max_city_length; ?> id="update_<?php echo $address_name; ?>_city"></td>
<td class="eo-label"><label for="update_<?= $address_name ?>_city"><?= ENTRY_CUSTOMER_CITY ?></label>:&nbsp;</td>
<td><input name="update_<?= $address_name ?>_city" size="45" value="<?= zen_output_string_protected($address_fields['city']) ?>" <?= $max_city_length ?> id="update_<?= $address_name ?>_city"></td>
</tr>

<tr>
<td class="eo-label"><label for="update_<?php echo $address_name; ?>_state"><?php echo ENTRY_CUSTOMER_STATE; ?></label>:&nbsp;</td>
<td><input name="update_<?php echo $address_name; ?>_state" size="45" value="<?php echo zen_output_string_protected($address_fields['state']); ?>" <?php echo $max_state_length; ?> id="update_<?php echo $address_name; ?>_state"></td>
<td class="eo-label"><label for="update_<?= $address_name ?>_state"><?= ENTRY_CUSTOMER_STATE ?></label>:&nbsp;</td>
<td><input name="update_<?= $address_name ?>_state" size="45" value="<?= zen_output_string_protected($address_fields['state']) ?>" <?= $max_state_length ?> id="update_<?= $address_name ?>_state"></td>
</tr>

<tr>
<td class="eo-label"><label for="update_<?php echo $address_name; ?>_postcode"><?php echo ENTRY_CUSTOMER_POSTCODE; ?></label>:&nbsp;</td>
<td><input name="update_<?php echo $address_name; ?>_postcode" size="45" value="<?php echo zen_output_string_protected($address_fields['postcode']); ?>" <?php echo $max_postcode_length; ?> id="update_<?php echo $address_name; ?>_postcode"></td>
<td class="eo-label"><label for="update_<?= $address_name ?>_postcode"><?= ENTRY_CUSTOMER_POSTCODE ?></label>:&nbsp;</td>
<td><input name="update_<?= $address_name ?>_postcode" size="45" value="<?= zen_output_string_protected($address_fields['postcode']) ?>" <?= $max_postcode_length ?> id="update_<?= $address_name ?>_postcode"></td>
</tr>

<tr>
<td class="eo-label"><label for="update_<?php echo $address_name; ?>_country"><?php echo ENTRY_CUSTOMER_COUNTRY; ?></label>:&nbsp;</td>
<td class="eo-label"><label for="update_<?= $address_name ?>_country"><?= ENTRY_CUSTOMER_COUNTRY ?></label>:&nbsp;</td>
<td>
<?php
if (is_array($address_fields['country']) && isset($address_fields['country']['id'])) {
echo zen_get_country_list('update_' . $address_name . '_country', $address_fields['country']['id'], 'id="update_' . $address_name . '_country"');
} else {
echo '<input name="update_' . $address_name . '_country" size="45" value="' . zen_output_string_protected($address_fields['country']) . '"' . $max_country_length . '" id="update_"' . $address_name . '_country">';
}
?>
<?php
if (is_array($address_fields['country']) && isset($address_fields['country']['id'])) {
echo zen_get_country_list('update_' . $address_name . '_country', $address_fields['country']['id'], 'id="update_' . $address_name . '_country"');
} else {
echo '<input name="update_' . $address_name . '_country" size="45" value="' . zen_output_string_protected($address_fields['country']) . '"' . $max_country_length . '" id="update_"' . $address_name . '_country">';
}
?>
</td>
</tr>
<?php
// -----
// Now, issue the address-specific notification to allow other plugins to add fields to the
// associated address.
//
// A watching observer can provide an associative array in the form:
//
// $extra_data = array(
// array(
// 'label' => 'label_name', //-No trailing ':', that will be added by EO.
// 'value' => $value //-This is the form-field to be added
// ),
// );
//
$additional_rows = [];
$zco_notifier->notify($address_notifier, $address_fields, $additional_rows);
if (!empty($additional_rows)) {
foreach ($additional_rows as $next_row) {
?>
<?php
// -----
// Now, issue the address-specific notification to allow other plugins to add fields to the
// associated address.
//
// A watching observer can provide an associative array in the form:
//
// $extra_data = array(
// array(
// 'label' => 'label_name', //-No trailing ':', that will be added by EO.
// 'value' => $value //-This is the form-field to be added
// ),
// );
//
$additional_rows = [];
$zco_notifier->notify($address_notifier, $address_fields, $additional_rows);
if (!empty($additional_rows)) {
foreach ($additional_rows as $next_row) {
?>
<tr>
<td class="eo-label"><?php echo $next_row['label']; ?></label>:&nbsp;</td>
<td><?php echo $next_row['value']; ?></td>
<td class="eo-label"><?= $next_row['label'] ?></label>:&nbsp;</td>
<td><?= $next_row['value'] ?></td>
</tr>
<?php
}
<?php
}
?>
}
?>
</table>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
/**
* @package Edit Orders for Zen Cart German
* Edit Orders plugin by Cindy Merkin a.k.a. lat9 (cindy@vinosdefrutastropicales.com)
* Copyright (c) 2017-2022 Vinos de Frutas Tropicales
* @copyright Copyright 2003-2022 Zen Cart Development Team
* Copyright (c) 2017-2024 Vinos de Frutas Tropicales
* @copyright Copyright 2003-2024 Zen Cart Development Team
* Zen Cart German Version - www.zen-cart-pro.at
* @copyright Portions Copyright 2003 osCommerce
* @license https://www.zen-cart-pro.at/license/3_0.txt GNU General Public License V3.0
* @version $Id: eo_edit_action_addresses_display.php 2022-06-10 08:21:16Z webchills $
* @version $Id: eo_edit_action_addresses_display.php 2024-03-20 08:21:16Z webchills $
*/
//
// This module is loaded in global scope by /admin/edit_orders.php.
Expand All @@ -27,12 +27,12 @@
$max_country_length = 'maxlength="' . zen_field_length(TABLE_ORDERS, 'customers_country') . '"';
?>
<div class="row" id="c-form">
<div class="col-sm-4">
<div class="col-sm-12 col-lg-4">
<?php
// -----
// Set variables for common address-format display.
//
$address_icon = 'icon_customers.png';
$address_icon = 'fa-solid fa fa-user';
$address_label = ENTRY_CUSTOMER;
$address_name = 'customer';
$address_fields = $order->customer;
Expand All @@ -41,19 +41,19 @@
?>
</div>

<div class="col-sm-4">
<div class="col-sm-12 col-lg-4">
<?php
// -----
// Set variables for common address-format display, based on the site's preferential order.
//
if (EO_ADDRESSES_DISPLAY_ORDER == 'CBS') {
$address_icon = 'icon_billing.png';
if (EO_ADDRESSES_DISPLAY_ORDER === 'CBS') {
$address_icon = 'fa-regular fa fa-credit-card';
$address_label = ENTRY_BILLING_ADDRESS;
$address_name = 'billing';
$address_fields = $order->billing;
$address_notifier = 'EDIT_ORDERS_ADDL_BILLING_ADDRESS_ROWS';
} else {
$address_icon = 'icon_shipping.png';
$address_icon = 'fa-solid fa fa-truck';
$address_label = ENTRY_SHIPPING_ADDRESS;
$address_name = 'delivery';
$address_fields = $order->delivery;
Expand All @@ -63,19 +63,19 @@
?>
</div>

<div class="col-sm-4">
<div class="col-sm-12 col-lg-4">
<?php
// -----
// Set variables for common address-format display, based on the site's preferential order.
//
if (EO_ADDRESSES_DISPLAY_ORDER == 'CBS') {
$address_icon = 'icon_shipping.png';
if (EO_ADDRESSES_DISPLAY_ORDER === 'CBS') {
$address_icon = 'fa-solid fa fa-truck';
$address_label = ENTRY_SHIPPING_ADDRESS;
$address_name = 'delivery';
$address_fields = $order->delivery;
$address_notifier = 'EDIT_ORDERS_ADDL_SHIPPING_ADDRESS_ROWS';
} else {
$address_icon = 'icon_billing.png';
$address_icon = 'fa-regular fa fa-credit-card';
$address_label = ENTRY_BILLING_ADDRESS;
$address_name = 'billing';
$address_fields = $order->billing;
Expand All @@ -84,4 +84,4 @@
require DIR_WS_MODULES . 'edit_orders/eo_common_address_format.php';
?>
</div>
</div>
</div>
Loading

0 comments on commit fac58ff

Please sign in to comment.