Skip to content

Commit

Permalink
3.5.1
Browse files Browse the repository at this point in the history
3.5.1
  • Loading branch information
PhocaCz committed May 9, 2020
1 parent 63539a5 commit c0bd7ac
Show file tree
Hide file tree
Showing 71 changed files with 2,060 additions and 1,106 deletions.
2 changes: 1 addition & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Phoca Cart is e-commerce extension - powerful shopping cart for Joomla! CMS. Pho

## Version

3.5.0
3.5.1



Expand Down
17 changes: 17 additions & 0 deletions admin/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,17 @@
<option value="2">COM_PHOCACART_BEFORE_LOGIN_FORM</option>
<option value="3">COM_PHOCACART_AFTER_LOGIN_FORM</option>
</field>


<field name="delivery_billing_same_enabled" type="list" class="btn-group btn-group-yesno" default="0" label="COM_PHOCACART_SAME_DELIVERY_BILLING_ADDRESS_CHECKED_LABEL" description="COM_PHOCACART_SAME_DELIVERY_BILLING_ADDRESS_CHECKED_DESC">
<option value="0">COM_PHOCACART_NO</option>
<option value="1">COM_PHOCACART_YES_NEW_USERS</option>
<option value="2">COM_PHOCACART_YES_NEW_GUEST_USERS</option>
<option value="3">COM_PHOCACART_YES_NEW_USERS_NEW_GUEST_USERS</option>
</field>


delivery_billing_same_enabled


<field name="phocahead30" type="phocahead" default="COM_PHOCACART_USER_ACCOUNT_VIEW_LABEL" label="" description=""/>
Expand Down Expand Up @@ -1413,6 +1424,12 @@
<option value="0">COM_PHOCACART_NO</option>
<option value="1">COM_PHOCACART_YES</option>
</field>

<field name="export_parameters" type="radio" class="btn-group btn-group-yesno" default="0" label="COM_PHOCACART_FIELD_EXPORT_PARAMETERS_LABEL"
description="COM_PHOCACART_FIELD_EXPORT_PARAMETERS_DESC">
<option value="0">COM_PHOCACART_NO</option>
<option value="1">COM_PHOCACART_YES</option>
</field>

<!--<field name="export_add_title" type="radio" class="btn-group btn-group-yesno" default="0" label="COM_PHOCACART_FIELD_ADD_TITLE_ATTRIBUTE_EXPORT_LABEL" description="COM_PHOCACART_FIELD_ADD_TITLE_ATTRIBUTE_EXPORT_DESC">
<option value="0">COM_PHOCACART_NO</option>
Expand Down
13 changes: 9 additions & 4 deletions admin/install/sql/mysql/install.utf8.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
CREATE TABLE IF NOT EXISTS `#__phocacart_categories` (
`id` int(11) NOT NULL auto_increment,
`parent_id` int(11) NOT NULL DEFAULT '0',
`user_id` int(11) NOT NULL,
`vendor_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL DEFAULT '0',
`vendor_id` int(11) NOT NULL DEFAULT '0',
`owner_id` int(11) NOT NULL DEFAULT '0',
`title` varchar(255) NOT NULL DEFAULT '',
`alias` varchar(255) NOT NULL DEFAULT '',
`image` varchar(255) NOT NULL DEFAULT '',
Expand Down Expand Up @@ -59,8 +60,9 @@ CREATE TABLE IF NOT EXISTS `#__phocacart_products` (
`catid` int(11) NOT NULL DEFAULT '0',
`tax_id` int(11) NOT NULL DEFAULT '0',
`manufacturer_id` int(11) NOT NULL DEFAULT '0',
`user_id` int(11) NOT NULL,
`vendor_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL DEFAULT '0',
`vendor_id` int(11) NOT NULL DEFAULT '0',
`owner_id` int(11) NOT NULL DEFAULT '0',
`title` varchar(255) NOT NULL DEFAULT '',
`alias` varchar(255) NOT NULL DEFAULT '',
`type` tinyint(3) NOT NULL default '0',
Expand Down Expand Up @@ -921,6 +923,8 @@ CREATE TABLE IF NOT EXISTS `#__phocacart_form_fields` (
`unique` tinyint(1) NOT NULL DEFAULT '0',
`preicon` varchar(100) NOT NULL DEFAULT '',
`format` varchar(50) NOT NULL DEFAULT '',
`pattern` text,
`maxlength` int(11) NOT NULL DEFAULT '0',
`additional` text,
`published` tinyint(1) NOT NULL DEFAULT '0',
`display_billing` tinyint(1) NOT NULL DEFAULT '0',
Expand Down Expand Up @@ -1168,6 +1172,7 @@ CREATE TABLE IF NOT EXISTS `#__phocacart_order_products` (
`order_id` int(11) NOT NULL DEFAULT '0',
`product_id` int(11) NOT NULL DEFAULT '0',
`category_id` int(11) NOT NULL DEFAULT '0',
`owner_id` int(11) NOT NULL DEFAULT '0',
`product_id_key` text,
`title` varchar(255) NOT NULL DEFAULT '',
`alias` varchar(255) NOT NULL DEFAULT '',
Expand Down
43 changes: 43 additions & 0 deletions admin/language/en-GB/en-GB.com_phocacart.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,49 @@ COM_PHOCACART_ORDER_PAYMENT_PROCESSED_DOWNLOADABLE_ITEMS_ADDITIONAL_INFO=""
COM_PHOCACART_ORDER_PAYMENT_CANCELED_ADDITIONAL_INFO=""


;[3.5.1]
COM_PHOCACART_ERROR_USER_EMAIL_NOT_EXISTS="Error - user's email does not exist"
COM_PHOCACART_FIELD_EXPORT_PARAMETERS_LABEL="Export Parameters"
COM_PHOCACART_FIELD_EXPORT_PARAMETERS_DESC="Set if parameters will be exported in export file"
COM_PHOCACART_SAME_DELIVERY_BILLING_ADDRESS_CHECKED_LABEL="Same Delivery And Billing Address - Checkbox Checked"
COM_PHOCACART_SAME_DELIVERY_BILLING_ADDRESS_CHECKED_DESC="Set if checkout checkbox 'Delivery and billing addresses are the same' will be checked as default. This only applies to new users and new guest users who have not yet saved their address."
COM_PHOCACART_YES_NEW_USERS="Yes (New Users)"
COM_PHOCACART_YES_NEW_GUEST_USERS="Yes (New Guest Users)"
COM_PHOCACART_YES_NEW_USERS_NEW_GUEST_USERS="Yes (New Users and New Guest Users)"
COM_PHOCACART_ORDER_STATUS_LABEL="Order status"
COM_PHOCACART_ORDER_STATUS_DESC="Select order status"
COM_PHOCACART_OPTION_SELECT_ORDER_STATUS="Select order status"
COM_PHOCACART_TOTAL_ASC="Total ascending"
COM_PHOCACART_TOTAL_DESC="Total descending"
COM_PHOCACART_STATUS_ASC="Status ascending"
COM_PHOCACART_STATUS_DESC="Status descending"
COM_PHOCACART_USER_ASC="User ascending"
COM_PHOCACART_USER_DESC="User descending"
COM_PHOCACART_ORDER_NUMBER_ASC="Order number ascending"
COM_PHOCACART_ORDER_NUMBER_DESC="Order number descending"
COM_PHOCACART_DATE_MODIFIED_ASC="Date modified ascending"
COM_PHOCACART_DATE_MODIFIED_DESC="Date modified descending"
COM_PHOCACART_FIELD_MAXLENGTH_LABEL="Maxlength Attribute"
COM_PHOCACART_FIELD_MAXLENGTH_DESC="Set 'Maxlength' attribute"
COM_PHOCACART_FIELD_PATTERN_LABEL="Pattern"
COM_PHOCACART_FIELD_PATTERN_DESC="Set pattern"
COM_PHOCACART_ONLY_ALPHANUMERIC_CHARACTERS_ARE_ALLOWED="Only alphanumeric characters are allowed"
COM_PHOCACART_PUBLISHED_ASC="Published ascending"
COM_PHOCACART_PUBLISHED_DESC="Published descending"
COM_PHOCACART_SKU_ASC="SKU ascending"
COM_PHOCACART_SKU_DESC="SKU descending"
COM_PHOCACART_PRICE_ASC="Price ascending"
COM_PHOCACART_PRICE_ASC="Price descending"
COM_PHOCACART_ORIGINAL_PRICE_ASC="Original price ascending"
COM_PHOCACART_ORIGINAL_PRICE_DESC="Original price descending"
COM_PHOCACART_STOCK_ASC="Stock ascending"
COM_PHOCACART_STOCK_DESC="Stock descending"
COM_PHOCACART_PRODUCT_COUNT_ASC="Product count ascending"
COM_PHOCACART_PRODUCT_COUNT_DESC="Product count descending"
COM_PHOCACART_PARENT_CATEGORY_ASC="Parent category ascending"
COM_PHOCACART_PARENT_CATEGORY_DESC="Parent category descending"
COM_PHOCACART_METADATA_LABEL="Metadata"

;[3.5.0]
COM_PHOCACART_SEF_NOIDS_LABEL="Remove IDs from URLs"
COM_PHOCACART_SEF_NOIDS_DESC="Remove the IDs from the URLs. Be aware, this is an experimental setting. If you set Yes, you must check all Phoca Cart links on your page."
Expand Down
179 changes: 178 additions & 1 deletion admin/layouts/product_export.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function str_putcsv($input, $delimiter = ';', $enclosure = '"') {
$export_discounts = $paramsC->get( 'export_discounts', 1 );
$export_downloads = $paramsC->get( 'export_downloads', 0 );
$export_add_title = $paramsC->get( 'export_add_title', 0);

$export_parameters = $paramsC->get( 'export_parameters', 0);
/*
*
* Unfortunately, add attributes to xml tags can be very problematic
Expand Down Expand Up @@ -128,6 +128,9 @@ function str_putcsv($input, $delimiter = ';', $enclosure = '"') {
$a[] = array('external_link', 'COM_PHOCACART_FIELD_EXTERNAL_LINK_LABEL');
$a[] = array('external_text', 'COM_PHOCACART_FIELD_EXTERNAL_TEXT_LABEL');

$a[] = array('external_link2', 'COM_PHOCACART_FIELD_EXTERNAL_LINK_2_LABEL');///
$a[] = array('external_text2', 'COM_PHOCACART_FIELD_EXTERNAL_TEXT_2_LABEL');///


$a[] = array('access', 'JFIELD_ACCESS_LABEL');
$a[] = array('groups', 'COM_PHOCACART_FIELD_GROUPS_LABEL');
Expand All @@ -138,12 +141,16 @@ function str_putcsv($input, $delimiter = ';', $enclosure = '"') {
$a[] = array('public_download_file', 'COM_PHOCACART_FIELD_PUBLIC_DOWNLOAD_FILE_LABEL');
$a[] = array('public_download_text', 'COM_PHOCACART_FIELD_PUBLIC_DOWNLOAD_FILE_TEXT_LABEL');

$a[] = array('public_play_file', 'COM_PHOCACART_FIELD_PUBLIC_FILE_PLAY_LABEL');///
$a[] = array('public_play_text', 'COM_PHOCACART_FIELD_PUBLIC_FILE_PLAY_TEXT_LABEL');///

$a[] = array('condition', 'COM_PHOCACART_FIELD_PRODUCT_CONDITION_LABEL');
$a[] = array('type_feed', 'COM_PHOCACART_FIELD_PRODUCT_TYPE_FEED_LABEL');
$a[] = array('type_category_feed', 'COM_PHOCACART_FIELD_PRODUCT_CATEGORY_TYPE_FEED_LABEL');

$a[] = array('description', 'COM_PHOCACART_FIELD_DESCRIPTION_LABEL');
$a[] = array('description_long', 'COM_PHOCACART_FIELD_DESCRIPTION_LONG_LABEL');
$a[] = array('features', 'COM_PHOCACART_FIELD_FEATURES_LABEL');///

$a[] = array('image', 'COM_PHOCACART_FIELD_IMAGE_LABEL');

Expand Down Expand Up @@ -180,13 +187,20 @@ function str_putcsv($input, $delimiter = ';', $enclosure = '"') {
$a[] = array('min_quantity', 'COM_PHOCACART_FIELD_MIN_ORDER_QUANTITY_LABEL');
$a[] = array('min_multiple_quantity', 'COM_PHOCACART_FIELD_MIN_MULTIPLE_ORDER_QUANTITY_LABEL');
$a[] = array('min_quantity_calculation', 'COM_PHOCACART_FIELD_MINIMUM_QUANTITY_CALCULATION_LABEL');

$a[] = array('delivery_date', 'COM_PHOCACART_FIELD_PRODUCT_DELIVERY_DATE_LABEL');///

//$a[] = array('availability', 'COM_PHOCACART_FIELD_AVAILABILITY_LABEL');

if ($export_downloads == 1) {
$a[] = array('download_token', 'COM_PHOCACART_FIELD_DOWNLOAD_TOKEN_LABEL');
$a[] = array('download_folder', 'COM_PHOCACART_FIELD_DOWNLOAD_FOLDER_LABEL');
$a[] = array('download_file', 'COM_PHOCACART_FIELD_DOWNLOAD_FILE_LABEL');
$a[] = array('download_hits', 'COM_PHOCACART_FIELD_DOWNLOAD_HITS_LABEL');
$a[] = array('download_days', 'COM_PHOCACART_FIELD_DOWNLOAD_EXPIRATION_DATE_DAYS_LABEL');///

// IMAGES (not exist in query)
$a[] = array('additional_download_files', 'COM_PHOCACART_ADDITIONAL_DOWNLOAD_FILES');///
}
$a[] = array('type', 'COM_PHOCACART_FIELD_PRODUCT_TYPE_LABEL');
$a[] = array('delivery_date', 'COM_PHOCACART_FIELD_PRODUCT_DELIVERY_DATE_LABEL');
Expand All @@ -211,12 +225,32 @@ function str_putcsv($input, $delimiter = ';', $enclosure = '"') {
$a[] = array('language', 'JFIELD_LANGUAGE_LABEL');

$a[] = array('date', 'COM_PHOCACART_FIELD_DATE_LABEL');
$a[] = array('date_update', 'COM_PHOCACART_FIELD_UPDATE_DATE_LABEL');///

$a[] = array('created_by', 'COM_PHOCACART_FIELD_CREATED_BY_LABEL');///
$a[] = array('created', 'COM_PHOCACART_FIELD_CREATED_DATE_LABEL');///
$a[] = array('modified_by', 'COM_PHOCACART_FIELD_UPDATE_DATE_LABEL');///
$a[] = array('modified', 'COM_PHOCACART_FIELD_MODIFIED_BY_LABEL');///





// TAGS (not exist in query)
$a[] = array('tags', 'COM_PHOCACART_TAGS');
$a[] = array('taglabels', 'COM_PHOCACART_LABELS');///

if($export_parameters == 1){
$a[] = array('items_parameter', 'COM_PHOCACART_PARAMETERS');///
$parameters = PhocacartParameter::getAllParameters();
}


$a[] = array('metakey', 'JFIELD_META_KEYWORDS_LABEL');
$a[] = array('metadesc', 'JFIELD_META_DESCRIPTION_LABEL');
$a[] = array('metatitle', 'COM_PHOCACART_FIELD_META_TITLE_LABEL');///
$a[] = array('metadata', 'COM_PHOCACART_METADATA_LABEL');///
$a[] = array('sales', 'COM_PHOCACART_FIELD_SALES_LABEL');///


//$a[] = array('allow_upload', 'COM_PHOCACART_FIELD_ALLOW_UPLOAD_LABEL');
Expand Down Expand Up @@ -274,6 +308,7 @@ function str_putcsv($input, $delimiter = ';', $enclosure = '"') {

case 'description':
case 'description_long':
case 'features':
case 'type_feed':
case 'type_category_feed':
if ($xml) {
Expand Down Expand Up @@ -427,7 +462,11 @@ function str_putcsv($input, $delimiter = ';', $enclosure = '"') {
$iP[] = $t5 . '<operator_weight>'.$vX2->operator_weight.'</operator_weight>';
$iP[] = $t5 . '<weight>'.$vX2->weight.'</weight>';
$iP[] = $t5 . '<image>'.$vX2->image.'</image>';
$iP[] = $t5 . '<image_medium>'.$vX2->image_medium.'</image_medium>';
$iP[] = $t5 . '<image_small>'.$vX2->image_small.'</image_small>';
$iP[] = $t5 . '<download_folder>'.$vX2->download_folder.'</download_folder>';
$iP[] = $t5 . '<download_token>'.$vX2->download_token.'</download_token>';
$iP[] = $t5 . '<download_file>'.$vX2->download_file.'</download_file>';
$iP[] = $t5 . '<color>'.$vX2->color.'</color>';
$iP[] = $t5 . '<default_value>'.$vX2->image.'</default_value>';
$iP[] = $t4 .'</option>';
Expand Down Expand Up @@ -478,6 +517,10 @@ function str_putcsv($input, $delimiter = ';', $enclosure = '"') {
$iP[] = $t3 . '<alias>'.$vX['alias'].'</alias>';
$iP[] = $t3 . '<value>'.$vX['value'].'</value>';
$iP[] = $t3 . '<alias_value>'.$vX['alias_value'].'</alias_value>';
$iP[] = $t3 . '<image>'.$vX['image'].'</image>';
$iP[] = $t3 . '<image_medium>'.$vX['image_medium'].'</image_medium>';
$iP[] = $t3 . '<image_small>'.$vX['image_small'].'</image_small>';
$iP[] = $t3 . '<color>'.$vX['color'].'</color>';
$iP[] = $t2 . '</specification>';
} else {
//$x[] = $vX['image'];
Expand Down Expand Up @@ -682,6 +725,97 @@ function str_putcsv($input, $delimiter = ';', $enclosure = '"') {
}
break;

case 'taglabels':

if (isset($v['id']) && (int)$v['id'] > 0) {
$items = PhocacartTag::getTagLabels((int)$v['id'], 2);
if (!empty($items)) {
if ($xml) {
$title = '';
if ($export_add_title == 1) {
$title = ' title="'.strip_tags(JText::_($v2[1])).'"';
}
$iP[] = $t1 . '<'.strip_tags($v2[0]).$title.'>';
}

$x = array();
foreach($items as $kX => $vX) {
if ($xml) {
$iP[] = $t2 . '<label>'.$vX->id.':'.$vX->alias.'</label>';
} else {
$x[] = $vX->id.':'.$vX->alias;
}
}


if ($xml) {
$iP[] = $t1 . '</'.strip_tags($v2[0]).'>';
} else {
$iP[] = implode('|', $x);
}
} else {
if ($csv) {$iP[] = '';}// CSV set right column count
}
}
break;

case 'items_parameter':

if (isset($v['id']) && (int)$v['id'] > 0) {

// $parameters = Parameters defined at start
if (!empty($parameters)) {

if ($xml) {
$title = '';
if ($export_add_title == 1) {
$title = ' title="'.strip_tags(JText::_($v2[1])).'"';
}
$iP[] = $t1 . '<'.strip_tags($v2[0]).$title.'>';
}


$items = array();
foreach($parameters as $kX => $vX) {

$idP = (int)$vX->id;
$items[$idP] = array();
if ($xml) {
$pA = PhocacartParameter::getParameterValues((int)$v['id'], $idP,0);
if (!empty($pA)) {
$iP[] = $t2 . '<parameter>';
$iP[] = $t3 . '<id>'.$vX->id.'</id>';
$iP[] = $t3 . '<title>'.$vX->title.'</title>';
$iP[] = $t3 . '<alias>'.$vX->alias.'</alias>';
$iP[] = $t3 . '<values>';
foreach($pA as $kX2 => $vX2) {
$iP[] = $t4 . '<value>';
$iP[] = $t5 . '<id>'.$vX2->id.'</id>';
$iP[] = $t5 . '<title>'.$vX2->title.'</title>';
$iP[] = $t5 . '<alias>'.$vX2->alias.'</alias>';
$iP[] = $t4 .'</value>';
}
$iP[] = $t3 . '</values>';
$iP[] = $t2 . '</parameter>';
}

} else {
$items[$idP] = PhocacartParameter::getParameterValues((int)$v['id'], $idP,2);// CSV
}
}

if ($xml) {
$iP[] = $t1 . '</'.strip_tags($v2[0]).'>';
} else {
//$iP[] = implode('|', $x);
$iP[] = json_encode($items);
}
} else {
if ($csv) {$iP[] = '';}// CSV set right column count
}
}
break;

case 'groups':

if (isset($v['id']) && (int)$v['id'] > 0) {
Expand Down Expand Up @@ -861,6 +995,49 @@ function str_putcsv($input, $delimiter = ';', $enclosure = '"') {
}
break;


case 'additional_download_files':

if (isset($v['id']) && (int)$v['id'] > 0) {
$items = PhocacartFileAdditional::getProductFilesByProductId((int)$v['id'], 1);

if (!empty($items)) {

if ($xml) {
$title = '';
if ($export_add_title == 1) {
$title = ' title="'.strip_tags(JText::_($v2[1])).'"';
}
$iP[] = $t1 . '<'.strip_tags($v2[0]).$title.'>';
}

$x = array();

foreach($items as $kX => $vX) {
if ($xml) {
$iP[] = $t2 . '<additional_download_file>';
$iP[] = $t3 . '<id>'.$vX['id'].'</id>';
$iP[] = $t3 . '<download_file>'.$vX['download_file'].'</download_file>';
$iP[] = $t3 . '<download_token>'.$vX['download_token'].'</download_token>';
$iP[] = $t3 . '<download_days>'.$vX['download_days'].'</download_days>';
$iP[] = $t2 . '</additional_download_file>';
} else {
//$x[] = $vX['image'];
}
}

if ($xml) {
$iP[] = $t1 . '</'.strip_tags($v2[0]).'>';
} else {
//$iP[] = implode('|', $x);
$iP[] = json_encode($items);
}
} else {
if ($csv) {$iP[] = '';}// CSV set right column count
}
}
break;

default:

break;
Expand Down
Loading

0 comments on commit c0bd7ac

Please sign in to comment.