Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/develop'
Browse files Browse the repository at this point in the history
Conflicts:
	catalog/includes/version.txt
  • Loading branch information
datazen committed Nov 7, 2014
2 parents a8a5544 + e978fcd commit 34bd5fd
Show file tree
Hide file tree
Showing 22 changed files with 318 additions and 176 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static function getAll() {
$QresultTotal->freeResult();

/* Paging */
$sLimit = "";
$sLimit = " LIMIT 0,25 ";
if (isset($_GET['iDisplayStart'])) {
if ($_GET['iDisplayLength'] != -1) {
$sLimit = " LIMIT " . $_GET['iDisplayStart'] . ", " . $_GET['iDisplayLength'];
Expand Down
5 changes: 4 additions & 1 deletion catalog/admin/includes/applications/orders/js/orders.js.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
@version $Id: orders.php v1.0 2013-08-08 datazen $
*/
global $lC_Template, $lC_Language, $cSearch;
$cSearch = (isset($_SESSION['cIDFilter']) && $_SESSION['cIDFilter'] != null) ? '&cSearch=' . $_SESSION['cIDFilter'] : '';
$cSearch = (isset($_SESSION['cIDFilter']) && $_SESSION['cIDFilter'] != null) ? '&cSearch=' . $_SESSION['cIDFilter'] : '';
if ($cSearch == '') {
$cSearch = (isset($_GET['oID']) && $_GET['oID'] != '') ? '&oSearch=' . $_GET['oID'] : '';
}
?>
<script>
$(document).ready(function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<td class="align-left mid-padding-left small-padding-top"><?php echo $oInfo->get('customerAddress');?></td>
</tr>
<tr>
<td class="class="align-left mid-padding-left" style="padding-top:10px;"><span class="bold icon-wifi icon-anthracite"> <?php echo $lC_Language->get('text_order_ip_address'); ?></span> <?php echo $oInfo->get('orderIPAddress');?></td>
<td class="align-left mid-padding-left" style="padding-top:10px;"><span class="bold icon-wifi icon-anthracite"> <?php echo $lC_Language->get('text_order_ip_address'); ?></span> <?php echo $oInfo->get('orderIPAddress');?></td>
</tr>
<!--<tr>
<td class="align-right pad-5 width-33 bold grey"><?php echo $lC_Language->get('text_company_name'); ?></td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public function __construct() {
'sku' => (isset($_POST['products_sku'])) ? $_POST['products_sku'] : '',
'tax_class_id' => (isset($_POST['products_tax_class_id'])) ? $_POST['products_tax_class_id'] : 0,
'products_name' => $_POST['products_name'],
'products_blurb' => $_POST['products_blurb'],
'products_description' => $_POST['products_description'],
'products_keyword' => $_POST['products_keyword'],
'products_tags' => $_POST['products_tags'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,21 +381,23 @@ public static function preview($id) {
$Qp->bindInt(':default_flag', 1);
$Qp->execute();

$Qpd = $lC_Database->query('select products_name, products_description, products_url, language_id from :table_products_description where products_id = :products_id');
$Qpd = $lC_Database->query('select products_name, products_blurb, products_description, products_url, language_id from :table_products_description where products_id = :products_id');
$Qpd->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
$Qpd->bindInt(':products_id', $id);
$Qpd->execute();

$pd_extra = array();
while ( $Qpd->next() ) {
$pd_extra['products_name'][$Qpd->valueInt('language_id')] = $Qpd->valueProtected('products_name');
$pd_extra['products_blurb'][$Qpd->valueInt('language_id')] = $Qpd->valueProtected('products_blurb');
$pd_extra['products_description'][$Qpd->valueInt('language_id')] = $Qpd->value('products_description');
$pd_extra['products_url'][$Qpd->valueInt('language_id')] = $Qpd->valueProtected('products_url');
}

$lC_ObjectInfo = new lC_ObjectInfo(array_merge($Qp->toArray(), $pd_extra));

$products_name = $lC_ObjectInfo->get('products_name');
$products_blurb = $lC_ObjectInfo->get('products_blurb');
$products_description = $lC_ObjectInfo->get('products_description');
$products_url = $lC_ObjectInfo->get('products_url');

Expand Down Expand Up @@ -617,7 +619,7 @@ public static function get($id) {
}
$Qoptions->freeResult();

if(DISPLAY_PRICE_WITH_TAX == 1) {
if (DISPLAY_PRICE_WITH_TAX == 1) {
$tax_data = lC_Tax_classes_Admin::getEntry($data['products_tax_class_id']);
$data['products_price_with_tax'] = ($data['products_price'] + ($tax_data['tax_rate']/100)*$data['products_price']);
//$data['products_cost_with_tax'] = $data['products_cost'] + ($tax_data['tax_rate']/100)*$data['products_cost'];
Expand Down Expand Up @@ -780,15 +782,16 @@ public static function save($id = null, $data) {
// }

if (is_numeric($id)) {
$Qpd = $lC_Database->query('update :table_products_description set products_name = :products_name, products_description = :products_description, products_keyword = :products_keyword, products_tags = :products_tags, products_url = :products_url where products_id = :products_id and language_id = :language_id');
$Qpd = $lC_Database->query('update :table_products_description set products_name = :products_name, products_blurb = :products_blurb, products_description = :products_description, products_keyword = :products_keyword, products_tags = :products_tags, products_url = :products_url where products_id = :products_id and language_id = :language_id');
} else {
$Qpd = $lC_Database->query('insert into :table_products_description (products_id, language_id, products_name, products_description, products_keyword, products_tags, products_url) values (:products_id, :language_id, :products_name, :products_description, :products_keyword, :products_tags, :products_url)');
$Qpd = $lC_Database->query('insert into :table_products_description (products_id, language_id, products_name, products_blurb, products_description, products_keyword, products_tags, products_url) values (:products_id, :language_id, :products_name, :products_blurb, :products_description, :products_keyword, :products_tags, :products_url)');
}

$Qpd->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
$Qpd->bindInt(':products_id', $products_id);
$Qpd->bindInt(':language_id', $l['id']);
$Qpd->bindValue(':products_name', $data['products_name'][$l['id']]);
$Qpd->bindValue(':products_blurb', $data['products_blurb'][$l['id']]);
$Qpd->bindValue(':products_description', $data['products_description'][$l['id']]);
$Qpd->bindValue(':products_keyword', $data['products_keyword'][$l['id']]);
$Qpd->bindValue(':products_tags', $data['products_tags'][$l['id']]);
Expand Down Expand Up @@ -1022,11 +1025,12 @@ public static function copy($id, $category_id, $type) {
$Qdesc->execute();

while ( $Qdesc->next() ) {
$Qnewdesc = $lC_Database->query('insert into :table_products_description (products_id, language_id, products_name, products_description, products_keyword, products_tags, products_url, products_viewed) values (:products_id, :language_id, :products_name, :products_description, :products_keyword, :products_tags, :products_url, 0)');
$Qnewdesc = $lC_Database->query('insert into :table_products_description (products_id, language_id, products_name, products_blurb, products_description, products_keyword, products_tags, products_url, products_viewed) values (:products_id, :language_id, :products_name, :products_blurb, :products_description, :products_keyword, :products_tags, :products_url, 0)');
$Qnewdesc->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
$Qnewdesc->bindInt(':products_id', $new_product_id);
$Qnewdesc->bindInt(':language_id', $Qdesc->valueInt('language_id'));
$Qnewdesc->bindValue(':products_name', $Qdesc->value('products_name') . '_Copy');
$Qnewdesc->bindValue(':products_blurb', $Qdesc->value('products_blurb'));
$Qnewdesc->bindValue(':products_description', $Qdesc->value('products_description'));
$Qnewdesc->bindValue(':products_keyword', $Qdesc->value('products_keyword') . '-copy');
$Qnewdesc->bindValue(':products_tags', $Qdesc->value('products_tags'));
Expand Down
4 changes: 3 additions & 1 deletion catalog/admin/includes/applications/products/pages/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,19 @@
if ( is_numeric($_GET[$lC_Template->getModule()]) ) {
$lC_ObjectInfo = new lC_ObjectInfo(lC_Products_Admin::get($_GET[$lC_Template->getModule()]));
$attributes = $lC_ObjectInfo->get('attributes');
$Qpd = $lC_Database->query('select products_name, products_description, products_keyword, products_tags, products_url, language_id from :table_products_description where products_id = :products_id');
$Qpd = $lC_Database->query('select products_name, products_blurb, products_description, products_keyword, products_tags, products_url, language_id from :table_products_description where products_id = :products_id');
$Qpd->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
$Qpd->bindInt(':products_id', $lC_ObjectInfo->getInt('products_id'));
$Qpd->execute();
$products_name = array();
$products_blurb = array();
$products_description = array();
$products_keyword = array();
$products_tags = array();
$products_url = array();
while ($Qpd->next()) {
$products_name[$Qpd->valueInt('language_id')] = $Qpd->value('products_name');
$products_blurb[$Qpd->valueInt('language_id')] = $Qpd->value('products_blurb');
$products_description[$Qpd->valueInt('language_id')] = $Qpd->value('products_description');
$products_keyword[$Qpd->valueInt('language_id')] = $Qpd->value('products_keyword');
$products_tags[$Qpd->valueInt('language_id')] = $Qpd->value('products_tags');
Expand Down
26 changes: 16 additions & 10 deletions catalog/admin/includes/applications/products/pages/tabs/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<div id="imagePreviewContainer" class="prod-image align-center">
<?php if (!$pInfo) { ?>
<div><img src="../images/no_image.png" style="max-width:100%;" /></div>
<div class="margin-top"><span class="input file"><span class="file-text"></span><span class="button compact">Select file</span><input type="file" class="file withClearFunctions" id="products_image" name="products_image"></span></div>
<div class="margin-top"><span class="input file"><span class="file-text"></span><span class="button compact"><?php echo $lC_Language->get('button_select_file'); ?></span><input type="file" class="file withClearFunctions" id="products_image" name="products_image"></span></div>
<?php } ?>
</div>
</div>
Expand Down Expand Up @@ -56,19 +56,25 @@
<?php echo lc_draw_input_field('products_name[' . $l['id'] . ']', (isset($pInfo) && isset($products_name[$l['id']]) ? $products_name[$l['id']] : null), 'id="products_name_' . $l['id'] . '" class="required input" style="width:97%;"'); ?>
</p>
<p class="button-height block-label">
<label class="label" for="<?php echo 'products_description[' . $l['id'] . ']'; ?>"><?php echo $lC_Language->get('field_description') . lc_show_info_bubble($lC_Language->get('info_bubble_content_description')); ?></label>
<?php echo lc_draw_textarea_field('products_description[' . $l['id'] . ']', (isset($pInfo) && isset($products_description[$l['id']]) ? $products_description[$l['id']] : null), null, 10, 'id="ckEditorProductDescription_' . $l['id'] . '" style="width:97%;" class="input full-width autoexpanding"'); ?>
</p>
<!-- <?php if (ENABLE_EDITOR == '1') { ?>
<p class="toggle-html-editor"><?php echo '<a href="javascript:toggleEditor(\'' . $l['id'] . '\');">' . $lC_Language->get('text_toggle_html_editor') . '</a>'; ?></p>
<p class="button-height block-label large-margin-top">
<?php } else { ?>
<p class="button-height block-label">
<?php } ?> -->
<label class="label" for="<?php echo 'products_keyword[' . $l['id'] . ']'; ?>"><?php echo $lC_Language->get('field_keyword') . lc_show_info_bubble($lC_Language->get('info_bubble_content_keyword')); ?></label>
<?php echo lc_draw_input_field('products_keyword[' . $l['id'] . ']', (isset($pInfo) && isset($products_keyword[$l['id']]) ? $products_keyword[$l['id']] : null), 'class="required input" style="width:97%" id="products_keyword_' . $l['id'] . '"' . (!isset($pInfo) ? ' onblur="validatePermalink(this.value);"' : null)); ?>
</p>
<p class="button-height block-label">
<label class="label" for="<?php echo 'products_blurb[' . $l['id'] . ']'; ?>"><?php echo $lC_Language->get('field_blurb') . lc_show_info_bubble($lC_Language->get('info_bubble_content_blurb')); ?></label>
<?php echo lc_draw_textarea_field('products_blurb[' . $l['id'] . ']', (isset($pInfo) && isset($products_blurb[$l['id']]) ? $products_blurb[$l['id']] : null), null, 3, 'id="products_blurb_' . $l['id'] . '" class="input full-width autoexpanding"'); ?>
</p>
<p class="button-height block-label">
<label class="label" for="<?php echo 'products_description[' . $l['id'] . ']'; ?>"><?php echo $lC_Language->get('field_description') . lc_show_info_bubble($lC_Language->get('info_bubble_content_description')); ?></label>
<?php echo lc_draw_textarea_field('products_description[' . $l['id'] . ']', (isset($pInfo) && isset($products_description[$l['id']]) ? $products_description[$l['id']] : null), null, 10, 'id="ckEditorProductDescription_' . $l['id'] . '" style="width:97%;" class="input full-width autoexpanding"'); ?>
</p>
<?php if (ENABLE_EDITOR == '1') { ?>
<p class="toggle-html-editor">
<?php echo '<a href="javascript:toggleEditor(\'' . $l['id'] . '\');">' . $lC_Language->get('text_toggle_html_editor') . '</a>'; ?>
</p>
<p class="button-height block-label large-margin-top">
<?php } else { ?>
<p class="button-height block-label">
<?php } ?>
<label class="label" for="<?php echo 'products_tags[' . $l['id'] . ']'; ?>"><?php echo $lC_Language->get('field_tags') . lc_show_info_bubble($lC_Language->get('info_bubble_content_tags')); ?></label>
<?php echo lc_draw_input_field('products_tags[' . $l['id'] . ']', (isset($pInfo) && isset($products_tags[$l['id']]) ? $products_tags[$l['id']] : null), 'id="products_tags_' . $l['id'] . '" class="input" style="width:97%" maxlength="255"'); ?>
</p>
Expand Down
16 changes: 14 additions & 2 deletions catalog/admin/includes/applications/updates/classes/updates.php
Original file line number Diff line number Diff line change
Expand Up @@ -774,11 +774,11 @@ public static function fullBackup() {
// create full file backup
if (utility::execEnabled() === true && utility::isLinux() === true) {
try {
exec(CFG_APP_ZIP . ' -r ' . DIR_FS_WORK . 'updates/' . $backup_file . ' ' . DIR_FS_CATALOG . '* -x \*.zip\*');
//exec(CFG_APP_ZIP . ' -r ' . DIR_FS_WORK . 'updates/' . $backup_file . ' ' . DIR_FS_CATALOG . '* -x \*.zip\*');
exec(CFG_APP_ZIP . ' -r ' . DIR_FS_WORK . 'updates/' . $backup_file . ' ' . DIR_FS_CATALOG . '* -x "/home/loadedne/www/sandbox/datazen/www/loaded7/catalog/images/products/*" -x "*.cache" -x "*.zip" -x "php_error*"');
} catch ( Exception $e ) {
return array('rpcStatus' => 0);
}

return array('rpcStatus' => 1);

} else if (extension_loaded('zip')) {
Expand Down Expand Up @@ -1004,6 +1004,18 @@ private static function _makeZip($source, $destination, $include_dir = true) {

// added to exclude zips
if (strstr($file, '.zip')) continue;

// added to exclude product images
if (strstr($file, 'images/products/')) continue;

// added to exclude work folder
if (strstr($file, 'includes/work/')) continue;

// added to exclude work folder
if (strstr($file, 'php_error')) continue;

// added to exclude work folder
if (strstr($file, 'qrcode/')) continue;

$file = realpath($file);

Expand Down
9 changes: 4 additions & 5 deletions catalog/admin/includes/languages/en_US/products.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
button_add_another_group = Add Another Group to this set
button_new_row = New Row
button_revert_changes = Revert Changes
button_select_file = Select File

field_name = Name:
field_blurb = Blurb:
field_complete = Complete
field_copy_method = Copy Method:
field_copy_to_category = Copy to Category:
Expand Down Expand Up @@ -72,30 +74,27 @@
info_bubble_content_status = Product Status
info_bubble_content_model = Product Model Number
info_bubble_content_weight = Product Weight

info_bubble_content_blurb = Product Blurb
info_bubble_inventory_control = Simple product with no variants or Multi-SKU product with variants.

info_bubble_pricing_base_price = Product Base Price
info_bubble_pricing_group_pricing = Separate Pricing Per Customer Group
info_bubble_pricing_qty_price_breaks = Quantity Price Breaks
info_bubble_pricing_specials = Product Specials Pricing

info_bubble_data_model = Product Model Number
info_bubble_data_msrp = Manufacturer Suggested Retail Price
info_bubble_data_track_inventory_override = Track Inventory Overrides
info_bubble_data_vendor = Product Vendor/Supplier
info_bubble_data_tax_class = Product Tax Class
info_bubble_data_price_with_tax = Product Price including Tax (calculated)
info_bubble_data_product_class = The Product Classification

info_bubble_shipping_weight = Product Weight
info_bubble_shipping_weight_class = Product Weight Class
info_bubble_shipping_non_shippable = Select for products that do not require shipping
info_bubble_shipping_dimensions = Product Dimensions
info_bubble_shipping_handling_fee = Shipping Handling Fee
info_bubble_shipping_fee_override = Shipping Fee Override
info_bubble_shipping_warehouse = Product Warehouse
info_bubble_shipping_date_expected = Producr Expected Date
info_bubble_shipping_date_expected = Product Expected Date

introduction_select_local_images = The following images are available on the server where additional images can be uploaded via FTP. The listing can be refreshed by clicking on the Local Files link.<br /><br />Please select from the following listing which images to assign to this product.
introduction_delete_image = Please verify the removal of the product image.
Expand Down
Loading

0 comments on commit 34bd5fd

Please sign in to comment.