Skip to content

Commit

Permalink
Version 2.0.0 beta9
Browse files Browse the repository at this point in the history
  • Loading branch information
Zen4All committed Apr 15, 2021
2 parents e05253d + f24f963 commit 56094a3
Show file tree
Hide file tree
Showing 111 changed files with 1,955 additions and 1,743 deletions.
2 changes: 1 addition & 1 deletion .github/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

This module is build for the Zen Cart versions mentioned below.

| | CITTINS Version | 1.0.2 | 2.0.0 (beta 8)|
| | CITTINS Version | 1.0.2 | 2.0.0 (beta 9)|
| ---: | --- | :---: | :---: |
| **Zen Cart Version** | | | |
| =<1.5.4 | | :x: | :x: |
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function translate_type_to_name($opt_type) {
<i class="fa fa-times" aria-hidden="true"></i>
<span class="sr-only"><?php echo TEXT_CLOSE; ?></span>
</button>
<h4 class="modal-title" id="EditAttributeValueModalLabel"><?php echo TITLE_ADD_ATTRIBUTE; ?></h4>
<h4 class="modal-title" id="addAttributeValueModalLabel"><?php echo TITLE_ADD_ATTRIBUTE; ?></h4>
</div>
<div class="modal-body">
<div class="row">
Expand Down Expand Up @@ -122,7 +122,7 @@ function translate_type_to_name($opt_type) {
<?php echo zen_draw_input_field('attributes_qty_prices', '', 'class="form-control"'); ?>
</div>
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-3">
<?php echo zen_draw_label(TABLE_HEADING_ATTRIBUTES_QTY_PRICES_ONETIME, '', 'class="control-label"'); ?>
<?php echo zen_draw_label(TABLE_HEADING_ATTRIBUTES_QTY_PRICES_ONETIME, 'attributes_qty_prices_onetime', 'class="control-label"'); ?>
<?php echo zen_draw_input_field('attributes_qty_prices_onetime', '', 'class="form-control"'); ?>
</div>
</div>
Expand Down Expand Up @@ -231,7 +231,7 @@ function translate_type_to_name($opt_type) {
<div class="row">
<div class="col-sm-6"><?php echo zen_draw_label(TEXT_ATTRIBUTES_IMAGE_DIR, 'img_dir', 'class="control-label"') . zen_draw_pull_down_menu('img_dir', zen_build_subdirectories_array(DIR_FS_CATALOG_IMAGES), 'attributes/', 'class="form-control"'); ?></div>
<div class="col-sm-6">
<?php echo zen_draw_label(TEXT_IMAGES_OVERWRITE, 'attributes_overwrite', 'çlass="control-label"'); ?>
<?php echo zen_draw_label(TEXT_IMAGES_OVERWRITE, 'attributes_overwrite', 'class="control-label"'); ?>
<div class="input-group">
<div class="radioBtn btn-group">
<a class="btn btn-info active" data-toggle="attributes_overwrite" data-title="0"><?php echo TEXT_NO; ?></a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<i class="fa fa-times" aria-hidden="true"></i>
<span class="sr-only"><?php echo TEXT_CLOSE; ?></span>
</button>
<h4 class="modal-title" id="EditAttributeValueModalLabel"><?php echo TITLE_EDIT_ATTRIBUTE; ?></h4>
<h4 class="modal-title" id="editAttributeValueModalLabel"><?php echo TITLE_EDIT_ATTRIBUTE; ?></h4>
</div>
<div class="modal-body">
<div class="row">
Expand Down Expand Up @@ -93,7 +93,7 @@
<?php echo zen_draw_input_field('attributes_qty_prices', '', 'class="form-control"'); ?>
</div>
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-3">
<?php echo zen_draw_label(TABLE_HEADING_ATTRIBUTES_QTY_PRICES_ONETIME, '', 'class="control-label"'); ?>
<?php echo zen_draw_label(TABLE_HEADING_ATTRIBUTES_QTY_PRICES_ONETIME, 'attributes_qty_prices_onetime', 'class="control-label"'); ?>
<?php echo zen_draw_input_field('attributes_qty_prices_onetime', '', 'class="form-control"'); ?>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<div id="update_attributes_copy_to_category" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
<div id="updateAttributesCopyToCategory" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
<?php echo zen_draw_form('product_copy_to_category', FILENAME_ATTRIBUTES_CONTROLLER, 'action=update_attributes_copy_to_category'); ?>
<div class="modal-dialog">
<div class="modal-content">
Expand Down Expand Up @@ -27,7 +27,7 @@
<span class="alert">
<?php echo zen_draw_label(TEXT_INFO_ATTRIBUTES_FEATURE_CATEGORIES_COPY_TO, 'categories_update_id', 'class="control-label"'); ?>
</span>
<?php echo zen_draw_products_pull_down_categories('categories_update_id', 'size="5" class="form-control"', '', true, true); ?>
<?php echo zen_draw_products_pull_down_categories('categories_update_id', 'size="5" class="form-control" id="categories_update_id"', '', true, true); ?>
</div>
<?php echo zen_draw_hidden_field('products_filter', $_GET['pID']); ?>
<?php echo zen_draw_hidden_field('products_update_id', $_GET['products_update_id']); ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,41 @@
?>
<div id="updateAttributesCopyToProduct" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
<form name="productCopyToProduct" method="post" enctype="multipart/form-data" id="productCopyToProduct">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">
<i class="fa fa-times" aria-hidden="true"></i>
<span class="sr-only"><?php echo TEXT_CLOSE; ?></span>
</button>
<h4 class="modal-title"><?php echo TEXT_INFO_ATTRIBUTES_FEATURES_COPY_TO_PRODUCT . $_GET['pID'] . ' - ' . zen_get_products_name((int)$_GET['pID']); ?></h4>
</div>
<div class="modal-body">
<div class="form-group">
<?php echo TEXT_COPY_ATTRIBUTES_CONDITIONS; ?>
<div class="radio">
<label><?php echo zen_draw_radio_field('copy_attributes', 'copy_attributes_delete', true) . TEXT_COPY_ATTRIBUTES_DELETE; ?></label>
</div>
<div class="radio">
<label><?php echo zen_draw_radio_field('copy_attributes', 'copy_attributes_update') . ' ' . TEXT_COPY_ATTRIBUTES_UPDATE; ?></label>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">
<i class="fa fa-times" aria-hidden="true"></i>
<span class="sr-only"><?php echo TEXT_CLOSE; ?></span>
</button>
<h4 class="modal-title"><?php echo TEXT_INFO_ATTRIBUTES_FEATURES_COPY_TO_PRODUCT . $_GET['pID'] . ' - ' . zen_get_products_name((int)$_GET['pID']); ?></h4>
</div>
<div class="modal-body">
<div class="form-group">
<?php echo TEXT_COPY_ATTRIBUTES_CONDITIONS; ?>
<div class="radio">
<label><?php echo zen_draw_radio_field('copy_attributes', 'copy_attributes_delete', true) . TEXT_COPY_ATTRIBUTES_DELETE; ?></label>
</div>
<div class="radio">
<label><?php echo zen_draw_radio_field('copy_attributes', 'copy_attributes_update') . ' ' . TEXT_COPY_ATTRIBUTES_UPDATE; ?></label>
</div>
<div class="radio">
<label><?php echo zen_draw_radio_field('copy_attributes', 'copy_attributes_ignore') . ' ' . TEXT_COPY_ATTRIBUTES_IGNORE; ?></label>
</div>
</div>
<div class="radio">
<label><?php echo zen_draw_radio_field('copy_attributes', 'copy_attributes_ignore') . ' ' . TEXT_COPY_ATTRIBUTES_IGNORE; ?></label>
<div class="form-group">
<span class="alert">
<?php echo zen_draw_label(TEXT_INFO_ATTRIBUTES_FEATURE_COPY_TO, 'products_update_id', 'class="control-label"'); ?>
</span>
<?php echo zen_draw_products_pull_down('products_update_id', 'size="15" class="form-control" id="products_update_id"', $products_exclude_array, true, '', true); ?>
</div>
<?php echo zen_draw_hidden_field('products_id', $_GET['pID']); ?>
</div>
<div class="form-group">
<span class="alert">
<?php echo zen_draw_label(TEXT_INFO_ATTRIBUTES_FEATURE_COPY_TO, 'products_update_id', 'class="control-label"'); ?>
</span>
<?php echo zen_draw_products_pull_down('products_update_id', 'size="15" class="form-control"', $products_exclude_array, true, '', true); ?>
<div class="modal-footer">
<button type="submit" class="btn btn-primary" onclick="copyAttributesToProduct();"><i class="fa fa-copy"></i> <?php echo IMAGE_COPY; ?></button>
<button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-close"></i> <?php echo TEXT_CLOSE; ?></button>
</div>
<?php echo zen_draw_hidden_field('products_id', $_GET['pID']); ?>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary" onclick="copyAttributesToProduct();"><i class="fa fa-copy"></i> <?php echo IMAGE_COPY; ?></button>
<button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-close"></i> <?php echo TEXT_CLOSE; ?></button>
</div>
</div>
</div>
</form>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,17 @@
}
$selected_categories = explode(',', $selected_categories_check);
?>
<?php $cnt_columns = 0; ?>
<tr>
<?php
while ($cnt_columns != MAX_DISPLAY_PRODUCTS_TO_CATEGORIES_COLUMNS) {
$cnt_columns++;
?>
<td class="text-right"><?php echo TEXT_INFO_ID; ?></td>
<td>Categories Name</td>
<?php } ?>
</tr>
<?php
$cnt_columns = 0;
echo '<tr>';
while ($cnt_columns != MAX_DISPLAY_PRODUCTS_TO_CATEGORIES_COLUMNS) {
$cnt_columns++;
echo '<td align="right">' . TEXT_INFO_ID . '</td>' . '<td align="left">' . 'Categories Name' . '</td>';
}
echo '</tr>';
// echo '<tr class="dataTableHeadingRow">';

$cnt_columns = 0;
while (!$categories_list->EOF) {
$cnt_columns++;
Expand All @@ -74,28 +75,33 @@
}
$zc_categories_checkbox = zen_draw_checkbox_field('categories_add[]', $categories_list->fields['categories_id'], $selected);
if ($cnt_columns == 1) {
echo '<tr>';
}
echo ' <td align="right">' . $categories_list->fields['categories_id'] . '</td>' . "\n";
if ($productInfo['master_categories_id']['value'] == $categories_list->fields['categories_id']) {
echo ' <td align="left">' . zen_image(DIR_WS_IMAGES . 'icon_yellow_on.gif', IMAGE_ICON_LINKED) . '&nbsp;' . $categories_list->fields['categories_name'] . zen_draw_hidden_field('current_master_categories_id', $categories_list->fields['categories_id']) . '</td>' . "\n";
} else {
echo ' <td align="left">' . ($selected ? '<strong>' : '') . $zc_categories_checkbox . '&nbsp;' . $categories_list->fields['categories_name'] . ($selected ? '</strong>' : '') . '</td>' . "\n";
}
$categories_list->MoveNext();
if ($cnt_columns == MAX_DISPLAY_PRODUCTS_TO_CATEGORIES_COLUMNS || $categories_list->EOF) {
if ($categories_list->EOF and $cnt_columns != MAX_DISPLAY_PRODUCTS_TO_CATEGORIES_COLUMNS) {
while ($cnt_columns < MAX_DISPLAY_PRODUCTS_TO_CATEGORIES_COLUMNS) {
$cnt_columns++;
echo ' <td align="right">' . '&nbsp;' . '</td>' . "\n";
echo ' <td align="left">' . '&nbsp;' . '</td>' . "\n";
?>
<tr>
<?php } ?>
<td class="text-right"><?php echo $categories_list->fields['categories_id']; ?></td>
<?php if ($productInfo['master_categories_id']['value'] == $categories_list->fields['categories_id']) { ?>
<td><?php echo zen_image(DIR_WS_IMAGES . 'icon_yellow_on.gif', IMAGE_ICON_LINKED) . '&nbsp;' . $categories_list->fields['categories_name'] . zen_draw_hidden_field('current_master_categories_id', $categories_list->fields['categories_id']); ?></td>
<?php } else { ?>
<td><?php echo ($selected ? '<strong>' : '') . $zc_categories_checkbox . '&nbsp;' . $categories_list->fields['categories_name'] . ($selected ? '</strong>' : ''); ?></td>
<?php
}
$categories_list->MoveNext();
if ($cnt_columns == MAX_DISPLAY_PRODUCTS_TO_CATEGORIES_COLUMNS || $categories_list->EOF) {
if ($categories_list->EOF && $cnt_columns != MAX_DISPLAY_PRODUCTS_TO_CATEGORIES_COLUMNS) {
while ($cnt_columns < MAX_DISPLAY_PRODUCTS_TO_CATEGORIES_COLUMNS) {
$cnt_columns++;
?>
<td class="text-right">&nbsp;</td>
<td>&nbsp;</td>
<?php
}
}
echo '</tr>' . "\n";
$cnt_columns = 0;
}
echo '</tr>' . "\n";
$cnt_columns = 0;
}
}
?>
?>
</table>
</div>
<?php } ?>
<?php
}
Original file line number Diff line number Diff line change
@@ -1,40 +1,36 @@
<?php
if (isset($_GET['pID']) && $_GET['pID'] != '') {
$languages = zen_get_languages();
$languages = zen_get_languages();

$orderedQuery = "SELECT sum(products_quantity) as products_ordered
FROM " . TABLE_ORDERS_PRODUCTS . "
WHERE products_id = " . $_GET['pID'];
$ordered = $db->Execute($orderedQuery);
$orderedQuery = "SELECT sum(products_quantity) as products_ordered
FROM " . TABLE_ORDERS_PRODUCTS . "
WHERE products_id = " . $_GET['pID'];
$ordered = $db->Execute($orderedQuery);

$viewQuery = "SELECT language_id, products_viewed
FROM " . TABLE_PRODUCTS_DESCRIPTION . "
WHERE products_id = " . $_GET['pID'];
$view = $db->Execute($viewQuery);
$viewQuery = "SELECT language_id, products_viewed
FROM " . TABLE_PRODUCTS_DESCRIPTION . "
WHERE products_id = " . $_GET['pID'];
$view = $db->Execute($viewQuery);

$viewArray = array();
foreach ($view as $item) {
$viewArray[] = array(
'language_id' => $item['language_id'],
'views' => $item['products_viewed']);
}
?>
<div class="form-group">
<ul class="list-group col-sm-3">
<li class="list-group-item justify-content-between">Numbers in stock:<span class="badge badge-default badge-pill"><?php echo $productInfo['products_quantity']['value']; ?></span></li>
<li class="list-group-item justify-content-between">Numbers sold: <span class="badge badge-default badge-pill"><?php echo $ordered->fields['products_ordered']; ?></span></li>
<li class="list-group-item justify-content-between">Times viewed:
<?php
for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
echo '<span class="badge badge-default badge-pill">' . zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . $viewArray[$i]['views'] . '</span>';
}
?>
<li class="list-group-item justify-content-between">reviews (maybe seperate tab)</li>
<li class="list-group-item"></li>
<li class="list-group-item"></li>
</ul>
</div>
<?php
$viewArray = array();
foreach ($view as $item) {
$viewArray[] = array(
'language_id' => $item['language_id'],
'views' => $item['products_viewed']);
}
?>
<div class="col-sm-12">
<ul class="list-group col-sm-3">
<li class="list-group-item justify-content-between">Numbers in stock:<span class="badge badge-default badge-pill"><?php echo $productInfo['products_quantity']['value']; ?></span></li>
<li class="list-group-item justify-content-between">Numbers sold: <span class="badge badge-default badge-pill"><?php echo $ordered->fields['products_ordered']; ?></span></li>
<li class="list-group-item justify-content-between">Times viewed:
<?php for ($i = 0, $n = sizeof($languages); $i < $n; $i++) { ?>
<span class="badge badge-default badge-pill"><?php echo zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . $viewArray[$i]['views']; ?></span>
<?php } ?>
</li>
</ul>
</div>
<?php
} else {
echo '<p class="bg-info">Please save the new product first.</p>';
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<thead>
<tr>
<td colspan="6">
<?php echo zen_draw_label(TEXT_PRODUCTS_MIXED_DISCOUNT_QUANTITY, 'products_mixed_discount_quantity'); ?>
<p><strong><?php echo TEXT_PRODUCTS_MIXED_DISCOUNT_QUANTITY; ?></strong></p>
<div class="input-group">
<div class="radioBtn btn-group">
<a class="btn btn-info <?php echo($productInfo['products_mixed_discount_quantity']['value'] == '1' ? 'active' : 'notActive'); ?>" data-toggle="products_mixed_discount_quantity" data-title="1"><?php echo TEXT_YES; ?></a>
Expand Down
Loading

0 comments on commit 56094a3

Please sign in to comment.