From 81115e4b308439881ec80e722fdc32fcb7abcbb1 Mon Sep 17 00:00:00 2001 From: Jan Date: Thu, 4 May 2023 13:10:58 +0200 Subject: [PATCH] 4.0.7 --- README.MD | 2 +- admin/controllers/phocacartexport.json.php | 1 + admin/controllers/phocacartimport.json.php | 2 + admin/install/sql/mysql/uninstall.utf8.sql | 145 +++++++++--------- admin/language/en-GB/en-GB.com_phocacart.ini | 2 + admin/layouts/product_export.php | 26 ++-- .../libraries/phocacart/category/multiple.php | 3 + admin/libraries/phocacart/filter/filter.php | 2 + admin/libraries/phocacart/order/order.php | 4 +- admin/libraries/phocacart/product/product.php | 16 ++ admin/libraries/phocacart/route/route.php | 25 +++ .../phocacart/specification/specification.php | 10 +- admin/libraries/phocacart/tax/tax.php | 26 ++++ manifest.xml | 6 +- phocacart-release.png | Bin 36351 -> 36007 bytes phocacart-release.svg | 2 +- phocacart.xml | 4 +- 17 files changed, 181 insertions(+), 95 deletions(-) diff --git a/README.MD b/README.MD index d01eb072..c93eed2a 100755 --- a/README.MD +++ b/README.MD @@ -122,7 +122,7 @@ Phoca Cart is e-commerce extension - powerful shopping cart for Joomla! CMS. Pho ## Version (Joomla! 4.x) -4.0.6 +4.0.7 diff --git a/admin/controllers/phocacartexport.json.php b/admin/controllers/phocacartexport.json.php index b95d4a8e..07d4af9d 100644 --- a/admin/controllers/phocacartexport.json.php +++ b/admin/controllers/phocacartexport.json.php @@ -15,6 +15,7 @@ require_once JPATH_COMPONENT.'/controllers/phocacartcommon.php'; class PhocaCartCpControllerPhocaCartExport extends PhocaCartCpControllerPhocaCartCommon { + public $t; public function export() { diff --git a/admin/controllers/phocacartimport.json.php b/admin/controllers/phocacartimport.json.php index 3cdc5cbc..bbb4e99a 100644 --- a/admin/controllers/phocacartimport.json.php +++ b/admin/controllers/phocacartimport.json.php @@ -16,6 +16,8 @@ class PhocaCartCpControllerPhocaCartImport extends PhocaCartCpControllerPhocaCartCommon { + public $t; + public function import() { diff --git a/admin/install/sql/mysql/uninstall.utf8.sql b/admin/install/sql/mysql/uninstall.utf8.sql index 2ae8400b..675f73ec 100644 --- a/admin/install/sql/mysql/uninstall.utf8.sql +++ b/admin/install/sql/mysql/uninstall.utf8.sql @@ -1,91 +1,96 @@ +-- Revision done 4.0.7 +DROP TABLE IF EXISTS `#__phocacart_attributes`; +DROP TABLE IF EXISTS `#__phocacart_attribute_values`; +DROP TABLE IF EXISTS `#__phocacart_bulk_prices`; +DROP TABLE IF EXISTS `#__phocacart_cart_multiple`; DROP TABLE IF EXISTS `#__phocacart_categories`; -DROP TABLE IF EXISTS `#__phocacart_category_access`; +DROP TABLE IF EXISTS `#__phocacart_countries`; +DROP TABLE IF EXISTS `#__phocacart_coupons`; +DROP TABLE IF EXISTS `#__phocacart_coupon_categories`; +DROP TABLE IF EXISTS `#__phocacart_coupon_count`; +DROP TABLE IF EXISTS `#__phocacart_coupon_count_user`; +DROP TABLE IF EXISTS `#__phocacart_coupon_products`; +DROP TABLE IF EXISTS `#__phocacart_currencies`; +DROP TABLE IF EXISTS `#__phocacart_discounts`; +DROP TABLE IF EXISTS `#__phocacart_discount_products`; +DROP TABLE IF EXISTS `#__phocacart_discount_categories`; +DROP TABLE IF EXISTS `#__phocacart_export`; +DROP TABLE IF EXISTS `#__phocacart_feeds`; +DROP TABLE IF EXISTS `#__phocacart_form_fields`; +DROP TABLE IF EXISTS `#__phocacart_groups`; +DROP TABLE IF EXISTS `#__phocacart_hits`; +DROP TABLE IF EXISTS `#__phocacart_import`; +DROP TABLE IF EXISTS `#__phocacart_item_access`; +DROP TABLE IF EXISTS `#__phocacart_item_groups`; +DROP TABLE IF EXISTS `#__phocacart_logs`; +DROP TABLE IF EXISTS `#__phocacart_manufacturers`; +DROP TABLE IF EXISTS `#__phocacart_opening_times`; +DROP TABLE IF EXISTS `#__phocacart_orders`; +DROP TABLE IF EXISTS `#__phocacart_order_attributes`; +DROP TABLE IF EXISTS `#__phocacart_order_coupons`; +DROP TABLE IF EXISTS `#__phocacart_order_discounts`; +DROP TABLE IF EXISTS `#__phocacart_order_downloads`; +DROP TABLE IF EXISTS `#__phocacart_order_history`; +DROP TABLE IF EXISTS `#__phocacart_order_products`; +DROP TABLE IF EXISTS `#__phocacart_order_product_discounts`; +DROP TABLE IF EXISTS `#__phocacart_order_statuses`; +DROP TABLE IF EXISTS `#__phocacart_order_tax_recapitulation`; +DROP TABLE IF EXISTS `#__phocacart_order_total`; +DROP TABLE IF EXISTS `#__phocacart_order_users`; +DROP TABLE IF EXISTS `#__phocacart_parameters`; +DROP TABLE IF EXISTS `#__phocacart_parameter_values`; +DROP TABLE IF EXISTS `#__phocacart_parameter_values_related`; +DROP TABLE IF EXISTS `#__phocacart_payment_methods`; +DROP TABLE IF EXISTS `#__phocacart_payment_method_countries`; +DROP TABLE IF EXISTS `#__phocacart_payment_method_currencies`; +DROP TABLE IF EXISTS `#__phocacart_payment_method_regions`; +DROP TABLE IF EXISTS `#__phocacart_payment_method_shipping`; +DROP TABLE IF EXISTS `#__phocacart_payment_method_zones`; DROP TABLE IF EXISTS `#__phocacart_products`; DROP TABLE IF EXISTS `#__phocacart_product_categories`; +DROP TABLE IF EXISTS `#__phocacart_product_discounts`; DROP TABLE IF EXISTS `#__phocacart_product_featured`; -DROP TABLE IF EXISTS `#__phocacart_product_images`; DROP TABLE IF EXISTS `#__phocacart_product_files`; -DROP TABLE IF EXISTS `#__phocacart_product_access`; -DROP TABLE IF EXISTS `#__phocacart_product_discounts`; -DROP TABLE IF EXISTS `#__phocacart_product_discount_access`; -DROP TABLE IF EXISTS `#__phocacart_product_price_groups`; +DROP TABLE IF EXISTS `#__phocacart_product_images`; DROP TABLE IF EXISTS `#__phocacart_product_point_groups`; +DROP TABLE IF EXISTS `#__phocacart_product_price_groups`; DROP TABLE IF EXISTS `#__phocacart_product_price_history`; -DROP TABLE IF EXISTS `#__phocacart_product_stock`; -DROP TABLE IF EXISTS `#__phocacart_attributes`; -DROP TABLE IF EXISTS `#__phocacart_attribute_values`; -DROP TABLE IF EXISTS `#__phocacart_specifications`; -DROP TABLE IF EXISTS `#__phocacart_specification_groups`; DROP TABLE IF EXISTS `#__phocacart_product_related`; +DROP TABLE IF EXISTS `#__phocacart_product_stock`; +DROP TABLE IF EXISTS `#__phocacart_questions`; +DROP TABLE IF EXISTS `#__phocacart_regions`; +DROP TABLE IF EXISTS `#__phocacart_reviews`; +DROP TABLE IF EXISTS `#__phocacart_reward_points`; +DROP TABLE IF EXISTS `#__phocacart_sections`; DROP TABLE IF EXISTS `#__phocacart_shipping_methods`; DROP TABLE IF EXISTS `#__phocacart_shipping_method_countries`; DROP TABLE IF EXISTS `#__phocacart_shipping_method_regions`; DROP TABLE IF EXISTS `#__phocacart_shipping_method_zones`; -DROP TABLE IF EXISTS `#__phocacart_shipping_method_access`; -DROP TABLE IF EXISTS `#__phocacart_countries`; -DROP TABLE IF EXISTS `#__phocacart_regions`; -DROP TABLE IF EXISTS `#__phocacart_zones`; -DROP TABLE IF EXISTS `#__phocacart_zone_countries`; -DROP TABLE IF EXISTS `#__phocacart_zone_regions`; -DROP TABLE IF EXISTS `#__phocacart_manufacturers`; +DROP TABLE IF EXISTS `#__phocacart_specifications`; +DROP TABLE IF EXISTS `#__phocacart_specification_groups`; DROP TABLE IF EXISTS `#__phocacart_stock_statuses`; +DROP TABLE IF EXISTS `#__phocacart_submit_items`; +DROP TABLE IF EXISTS `#__phocacart_taglabels_related`; DROP TABLE IF EXISTS `#__phocacart_tags`; DROP TABLE IF EXISTS `#__phocacart_tags_related`; -DROP TABLE IF EXISTS `#__phocacart_taglabels_related`; -DROP TABLE IF EXISTS `#__phocacart_parameters`; -DROP TABLE IF EXISTS `#__phocacart_parameter_values`; -DROP TABLE IF EXISTS `#__phocacart_parameter_values_related`; DROP TABLE IF EXISTS `#__phocacart_taxes`; DROP TABLE IF EXISTS `#__phocacart_tax_countries`; +DROP TABLE IF EXISTS `#__phocacart_tax_plugins`; DROP TABLE IF EXISTS `#__phocacart_tax_regions`; -DROP TABLE IF EXISTS `#__phocacart_currencies`; -DROP TABLE IF EXISTS `#__phocacart_coupons`; -DROP TABLE IF EXISTS `#__phocacart_coupon_count`; -DROP TABLE IF EXISTS `#__phocacart_coupon_count_user`; -DROP TABLE IF EXISTS `#__phocacart_coupon_products`; -DROP TABLE IF EXISTS `#__phocacart_coupon_categories`; +DROP TABLE IF EXISTS `#__phocacart_units`; +DROP TABLE IF EXISTS `#__phocacart_users`; +DROP TABLE IF EXISTS `#__phocacart_vendors`; +DROP TABLE IF EXISTS `#__phocacart_wishlists`; +DROP TABLE IF EXISTS `#__phocacart_zones`; +DROP TABLE IF EXISTS `#__phocacart_zone_countries`; +DROP TABLE IF EXISTS `#__phocacart_zone_regions`; + +-- Obsolete +DROP TABLE IF EXISTS `#__phocacart_cart`; +DROP TABLE IF EXISTS `#__phocacart_category_access`; DROP TABLE IF EXISTS `#__phocacart_coupon_access`; -DROP TABLE IF EXISTS `#__phocacart_discounts`; -DROP TABLE IF EXISTS `#__phocacart_discount_products`; -DROP TABLE IF EXISTS `#__phocacart_discount_categories`; DROP TABLE IF EXISTS `#__phocacart_discount_access`; -DROP TABLE IF EXISTS `#__phocacart_payment_methods`; -DROP TABLE IF EXISTS `#__phocacart_payment_method_countries`; -DROP TABLE IF EXISTS `#__phocacart_payment_method_regions`; -DROP TABLE IF EXISTS `#__phocacart_payment_method_zones`; -DROP TABLE IF EXISTS `#__phocacart_payment_method_shipping`; DROP TABLE IF EXISTS `#__phocacart_payment_method_access`; -DROP TABLE IF EXISTS `#__phocacart_reviews`; -DROP TABLE IF EXISTS `#__phocacart_form_fields`; -DROP TABLE IF EXISTS `#__phocacart_users`; -DROP TABLE IF EXISTS `#__phocacart_cart`; -DROP TABLE IF EXISTS `#__phocacart_cart_multiple`; -DROP TABLE IF EXISTS `#__phocacart_order_statuses`; -DROP TABLE IF EXISTS `#__phocacart_orders`; -DROP TABLE IF EXISTS `#__phocacart_order_users`; -DROP TABLE IF EXISTS `#__phocacart_order_products`; -DROP TABLE IF EXISTS `#__phocacart_order_attributes`; -DROP TABLE IF EXISTS `#__phocacart_order_coupons`; -DROP TABLE IF EXISTS `#__phocacart_order_total`; -DROP TABLE IF EXISTS `#__phocacart_order_tax_recapitulation`; -DROP TABLE IF EXISTS `#__phocacart_order_history`; -DROP TABLE IF EXISTS `#__phocacart_order_downloads`; -DROP TABLE IF EXISTS `#__phocacart_order_discounts`; -DROP TABLE IF EXISTS `#__phocacart_order_product_discounts`; -DROP TABLE IF EXISTS `#__phocacart_logs`; -DROP TABLE IF EXISTS `#__phocacart_feeds`; -DROP TABLE IF EXISTS `#__phocacart_wishlists`; -DROP TABLE IF EXISTS `#__phocacart_questions`; -DROP TABLE IF EXISTS `#__phocacart_hits`; -DROP TABLE IF EXISTS `#__phocacart_groups`; -DROP TABLE IF EXISTS `#__phocacart_item_groups`; -DROP TABLE IF EXISTS `#__phocacart_reward_points`; -DROP TABLE IF EXISTS `#__phocacart_item_access`; -DROP TABLE IF EXISTS `#__phocacart_export`; -DROP TABLE IF EXISTS `#__phocacart_import`; -DROP TABLE IF EXISTS `#__phocacart_vendors`; -DROP TABLE IF EXISTS `#__phocacart_sections`; -DROP TABLE IF EXISTS `#__phocacart_units`; -DROP TABLE IF EXISTS `#__phocacart_opening_times`; -DROP TABLE IF EXISTS `#__phocacart_submit_items`; -DROP TABLE IF EXISTS `#__phocacart_bulk_prices`; \ No newline at end of file +DROP TABLE IF EXISTS `#__phocacart_product_access`; +DROP TABLE IF EXISTS `#__phocacart_product_discount_access`; +DROP TABLE IF EXISTS `#__phocacart_shipping_method_access`; diff --git a/admin/language/en-GB/en-GB.com_phocacart.ini b/admin/language/en-GB/en-GB.com_phocacart.ini index f226932b..8731f4e5 100644 --- a/admin/language/en-GB/en-GB.com_phocacart.ini +++ b/admin/language/en-GB/en-GB.com_phocacart.ini @@ -16,6 +16,8 @@ COM_PHOCACART_ORDER_PAYMENT_PROCESSED_ADDITIONAL_INFO="" COM_PHOCACART_ORDER_PAYMENT_PROCESSED_DOWNLOADABLE_ITEMS_ADDITIONAL_INFO="" COM_PHOCACART_ORDER_PAYMENT_CANCELED_ADDITIONAL_INFO="" +;[4.0.7] +COM_PHOCACART_FIELD_HIDE_TAX_DESC="If tax calculation is enabled (prices include tax), the tax or netto item can be hidden for different views. Select in which views the tax or netto item will not be displayed - it only applies to this tax." ;[4.0.6] COM_PHOCACART_FIELD_CURRENCY_LABEL="Currency" COM_PHOCACART_FIELD_CURRENCY_DESC="Select currency" diff --git a/admin/layouts/product_export.php b/admin/layouts/product_export.php index 6b3c8783..401f7f55 100644 --- a/admin/layouts/product_export.php +++ b/admin/layouts/product_export.php @@ -7,8 +7,8 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL */ defined('_JEXEC') or die(); -use Joomla\CMS\Factory; -use Joomla\CMS\Language\Text; +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; // Specific function for CSV @@ -338,7 +338,7 @@ function str_putcsv($input, $delimiter = ';', $enclosure = '"') { } if (isset($v[$col])) { - $iP[] = $t1 . '<'.strip_tags($iCN[$k2]).$title.'>' . $l . $v[$col] . $r. ''; + $iP[] = $t1 . '<'.strip_tags($iCN[$k2]).$title.'>' . $l . htmlspecialchars($v[$col], ENT_XML1) . $r. ''; } } else { $iP[] = $v[$col]; @@ -446,7 +446,7 @@ function str_putcsv($input, $delimiter = ';', $enclosure = '"') { if ($xml) { $iP[] = $t2 . ''; $iP[] = $t3 . ''.$vX->id.''; - $iP[] = $t3 . ''.$vX->title.''; + $iP[] = $t3 . ''.htmlspecialchars($vX->title, ENT_XML1).''; $iP[] = $t3 . ''.$vX->alias.''; $iP[] = $t3 . ''.$vX->required.''; $iP[] = $t3 . ''.$vX->type.''; @@ -455,7 +455,7 @@ function str_putcsv($input, $delimiter = ';', $enclosure = '"') { foreach($vX->options as $kX2 => $vX2) { $iP[] = $t4 . '