Skip to content

Commit

Permalink
Version 3.2204 release
Browse files Browse the repository at this point in the history
  • Loading branch information
ClicShopping authored and ClicShopping committed Dec 5, 2020
1 parent 8698cf5 commit 4177ec4
Show file tree
Hide file tree
Showing 32 changed files with 191 additions and 200 deletions.
13 changes: 11 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@

Version 3.2204
- Fix rss files request sql errors
- fix taxes
- fix qty shopping cart

---

Version 3.2201
Change ClicShopping version
little quickly fix
- Change ClicShopping version
- little quickly fix

---
Version 3.22

See SQL upgrade directory to update your database from v3.2145
Expand Down
21 changes: 15 additions & 6 deletions _htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@

#AcceptPathInfo on

<FilesMatch "\.(s?p?html|cgi|pl|exe)$">
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
order allow,deny
Deny from all
</IfModule>
</FilesMatch>

##################################
# Security
Expand All @@ -13,13 +22,13 @@
<IfModule mod_headers.c>

# prevent mime based attacks
Header set X-Content-Type-Options "nosniff"
#Header set X-Content-Type-Options "nosniff"

# XSS Protection
Header set X-XSS-Protection "1; mode=block"
#Header set X-XSS-Protection "1; mode=block"

#X Frame
Header always set X-FRAME-OPTIONS "DENY"
#Header always set X-FRAME-OPTIONS "DENY"
</IfModule>
##################################
# Bot
Expand Down Expand Up @@ -58,17 +67,17 @@ RewriteEngine On

## URL Canonicalization
#to change in function your website
# RewriteCond %{HTTP_HOST} !^www.mysite.org$ [NC]
# RewriteRule ^(.*)$ https://www.mysite.org/$1 [L,R=301]

#to change in function your website
#RewriteBase /

# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_FILENAME} !-d

#RewriteCond %{HTTP_HOST} ^figures-shop.com [NC]
#RewriteCond %{REQUEST_URI} !
#RewriteRule ^(.*)$ https://www.figures-shop.com/index.php/$1 [L,R=301,NC]
#to change in function your website
#RewriteRule . /index.php [L]
</IfModule>

##################################
Expand Down
10 changes: 5 additions & 5 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ private function setTitle() :string
and language_id = :language_id
limit 1
');
$Qsubmit->bindInt(':language_id', (int)$this->lang->getId());
$Qsubmit->bindInt(':language_id', $this->lang->getId());
$Qsubmit->execute();

if ($Qsubmit->fetch() !== false) {
Expand Down Expand Up @@ -237,7 +237,7 @@ public function setListRSS() :array
and p.products_id = p2c.products_id
and p.products_archive = 0
and language_id = :language_id
order by p.products_date_added des
order by p.products_date_added desc
limit :limit
');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ public function process()
// take also the shipping taxe

$compound_tax = false;

$gst_total = 0;
$pst_total = 0;
$hst_total = 0;

if ($CLICSHOPPING_Order->delivery['zone_id'] == 0) {
$QzoneCheck = $CLICSHOPPING_Db->prepare('select zone_id
from :table_zones
Expand Down Expand Up @@ -243,7 +246,6 @@ public function process()
// **********************************
// normal tax
// ************************************

foreach ($CLICSHOPPING_Order->info['tax_groups'] as $key => $value) {
if ($value > 0) {
$this->output[] = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ cfg_order_total_tax_status_description = Sélectionner True pour afficher le mod

cfg_order_total_tax_status_true = True
cfg_order_total_tax_status_false = False

Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module_tx_title = Taxes
module_tx_public_title = Taxes
module_tx_short_title = Taxes

products_tax_description = Taxes
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ module_tx_title = Tax
module_tx_public_title = Tax
module_tx_short_title = Tax

products_tax_description = Taxes
46 changes: 23 additions & 23 deletions includes/ClicShopping/Apps/Orders/Orders/Classes/Shop/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -620,24 +620,23 @@ public function cart()
$CLICSHOPPING_ProductsAttributes = Registry::get('ProductsAttributes');

$products = $CLICSHOPPING_ShoppingCart->get_products();


if (is_array($products)) {
// Requetes SQL pour savoir si le groupe B2B a les prix affiches en HT ou TTC
if ($CLICSHOPPING_Customer->getCustomersGroupID() != 0) {
//Group tax
$QgroupTax = $this->db->prepare('select group_order_taxe,
if ($CLICSHOPPING_Customer->getCustomersGroupID() != 0) {
$QgroupTax = $this->db->prepare('select group_order_taxe,
group_tax
from :table_customers_groups
where customers_group_id = :customers_group_id
');
$QgroupTax->bindInt(':customers_group_id', (int)$CLICSHOPPING_Customer->getCustomersGroupID());
$QgroupTax->execute();

$group_tax = $QgroupTax->fetch();
} else {
$group_tax = false;
}
$QgroupTax->bindInt(':customers_group_id', (int)$CLICSHOPPING_Customer->getCustomersGroupID());
$QgroupTax->execute();
$group_tax = $QgroupTax->fetch();
} else {
$group_tax = false;
}

if (is_array($products)) {
for ($i = 0, $n = count($products); $i < $n; $i++) {
// Display an indicator to identify if the product belongs at a customer group or not.
$QproductsQuantityUnitId = $this->db->prepare('select products_quantity_unit_id_group
Expand Down Expand Up @@ -747,28 +746,29 @@ public function cart()

$shown_price = $shown_price['actual_shown_price'];
} else {
$shown_price = 1;
$this->info['subtotal'] += Tax::addTax($this->products[$index]['final_price'], $this->products[$index]['tax']) * $this->products[$index]['qty'];
$shown_price = Tax::addTax($this->products[$index]['final_price'], $this->products[$index]['tax']) * $this->products[$index]['qty'];
$this->info['subtotal'] += $shown_price;
}

$products_tax = $this->products[$index]['tax'];
$products_tax_description = $this->products[$index]['tax_description'];

if (((DISPLAY_PRICE_WITH_TAX == 'true') && ($CLICSHOPPING_Customer->getCustomersGroupID() == 0)) || (($CLICSHOPPING_Customer->getCustomersGroupID() != 0) && ($group_tax['group_tax'] == 'true'))) {
$this->info['tax'] += $shown_price - ($shown_price / (($products_tax < 10) ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax)));

// tax control for B2B group setting
if ((DISPLAY_PRICE_WITH_TAX == 'true' && $CLICSHOPPING_Customer->getCustomersGroupID() == 0) || ($CLICSHOPPING_Customer->getCustomersGroupID() != 0 && $group_tax['group_tax'] == 'true')) {
$this->info['tax'] += $shown_price - ($shown_price / (($products_tax < 10) ? '1.0' . str_replace('.', '', $products_tax) : '1.' . str_replace('.', '', $products_tax)));
if (isset($this->info['tax_groups']["$products_tax_description"])) {
$this->info['tax_groups']["$products_tax_description"] += $shown_price - ($shown_price / (($products_tax < 10) ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax)));

if (isset($this->info['tax_groups']['products_tax_description'])) {
$this->info['tax_groups']['products_tax_description'] += $shown_price - ($shown_price / (($products_tax < 10) ? '1.0' . str_replace('.', '', $products_tax) : '1.' . str_replace('.', '', $products_tax)));
} else {
$this->info['tax_groups']['products_tax_description'] = $shown_price - ($shown_price / (($products_tax < 10) ? '1.0' . str_replace('.', '', $products_tax) : '1.' . str_replace('.', '', $products_tax)));
$this->info['tax_groups']["$products_tax_description"] = $shown_price - ($shown_price / (($products_tax < 10) ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax)));
}
} else {
$this->info['tax'] += ($products_tax / 100) * $shown_price;

if (isset($this->info['tax_groups']['products_tax_description'])) {
$this->info['tax_groups']['products_tax_description'] += ($products_tax / 100) * $shown_price;
if (isset($this->info['tax_groups']["$products_tax_description"])) {
$this->info['tax_groups']["$products_tax_description"] += ($products_tax / 100) * $shown_price;
} else {
$this->info['tax_groups']['products_tax_description'] = ($products_tax / 100) * $shown_price;
$this->info['tax_groups']["$products_tax_description"] = ($products_tax / 100) * $shown_price;
}
}

Expand Down
20 changes: 0 additions & 20 deletions includes/ClicShopping/Custom/Schema/index.php

This file was deleted.

12 changes: 6 additions & 6 deletions includes/ClicShopping/External/vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -655,17 +655,17 @@
},
{
"name": "stripe/stripe-php",
"version": "v7.65.0",
"version_normalized": "7.65.0.0",
"version": "v7.62.0",
"version_normalized": "7.62.0.0",
"source": {
"type": "git",
"url": "https://github.com/stripe/stripe-php.git",
"reference": "d4a22eeec7654efb8476fe8bea95b1e9928025a6"
"reference": "9c2fc846d5b2719945e825228474f15314c0fed6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/d4a22eeec7654efb8476fe8bea95b1e9928025a6",
"reference": "d4a22eeec7654efb8476fe8bea95b1e9928025a6",
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/9c2fc846d5b2719945e825228474f15314c0fed6",
"reference": "9c2fc846d5b2719945e825228474f15314c0fed6",
"shasum": ""
},
"require": {
Expand All @@ -681,7 +681,7 @@
"squizlabs/php_codesniffer": "^3.3",
"symfony/process": "~3.4"
},
"time": "2020-11-19T19:37:25+00:00",
"time": "2020-11-09T16:57:44+00:00",
"type": "library",
"extra": {
"branch-alias": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
-----BEGIN RSA PRIVATE KEY-----
MIIBOgIBAAJBAM12w6/J20HMj0V9VC24xPFQG9RKSDt8vmviM+tnc1BgCrzPyF1v
3/rWGoWDjkJrE9WFOeqIjJHeEWWT4uKq2ZkCAwEAAQJAZZYJ7Nld+et9DvuHak/H
uBRGnjDYA+mKcObXitWMUzk2ZodL8UoCP1J9kKqV8Zp/l2cBZkLo0aWTN94sWkHy
rQIhAOhxWxRXSZ4kArIQqZnDG9JgtOAeaaFso/zpxIHpN6OrAiEA4klzl+rUc32/
7SDcJYa9j5vehp1jCTnkN+n0rujTM8sCIAGwMRUovSQk5tAcRt8TB7SzdxzZm7LM
czR3DjJTW1AZAiEAlYN+svPgJ+cAdwdtLgZXHZoZb8xx8Vik6CTXHPKNCf0CIBQL
zF4Qp8/C+gjsXtEZJvhxY7i1luHn6iNwNnE932r3
-----END RSA PRIVATE KEY-----
-----BEGIN RSA PRIVATE KEY-----
MIIBOgIBAAJBAM12w6/J20HMj0V9VC24xPFQG9RKSDt8vmviM+tnc1BgCrzPyF1v
3/rWGoWDjkJrE9WFOeqIjJHeEWWT4uKq2ZkCAwEAAQJAZZYJ7Nld+et9DvuHak/H
uBRGnjDYA+mKcObXitWMUzk2ZodL8UoCP1J9kKqV8Zp/l2cBZkLo0aWTN94sWkHy
rQIhAOhxWxRXSZ4kArIQqZnDG9JgtOAeaaFso/zpxIHpN6OrAiEA4klzl+rUc32/
7SDcJYa9j5vehp1jCTnkN+n0rujTM8sCIAGwMRUovSQk5tAcRt8TB7SzdxzZm7LM
czR3DjJTW1AZAiEAlYN+svPgJ+cAdwdtLgZXHZoZb8xx8Vik6CTXHPKNCf0CIBQL
zF4Qp8/C+gjsXtEZJvhxY7i1luHn6iNwNnE932r3
-----END RSA PRIVATE KEY-----
Loading

0 comments on commit 4177ec4

Please sign in to comment.