Skip to content

Commit

Permalink
3.0.0RC9
Browse files Browse the repository at this point in the history
  • Loading branch information
PhocaCz committed Jul 17, 2017
1 parent 19a27e0 commit 2ef0b80
Show file tree
Hide file tree
Showing 215 changed files with 2,470 additions and 1,254 deletions.
44 changes: 41 additions & 3 deletions config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,23 @@

<field name="cv_display_subcategories" default="0" size="10" type="text" label="COM_PHOCACART_FIELD_DISPLAY_SUBCATEGORIES_CV_ITEMS_LABEL" description="COM_PHOCACART_FIELD_DISPLAY_SUBCATEGORIES_CV_ITEMS_DESC" />

<field name="cv_display_description" type="radio" class="btn-group btn-group-yesno" default="1" label="COM_PHOCACART_FIELD_DISPLAY_PRODUCT_DESCRIPTION_CATEGORY_LABEL" description="COM_PHOCACART_FIELD_DISPLAY_PRODUCT_DESCRIPTION_CATEGORY_DESC">
<option value="1">COM_PHOCACART_YES</option>
<option value="0">COM_PHOCACART_NO</option>
</field>

<field name="display_product_header" type="list" default="h3" label="COM_PHOCACART_FIELD_DISPLAY_PRODUCT_HEADER_CAREGORY_LABEL" description="COM_PHOCACART_FIELD_DISPLAY_PRODUCT_HEADER_CAREGORY_DESC">
<option value="h1">h1</option>
<option value="h2">h2</option>
<option value="h3">h3</option>
<option value="h4">h4</option>
<option value="h5">h5</option>
<option value="h6">h6</option>
<option value="div">div</option>
<option value="p">p</option>
<option value="-1">COM_PHOCACART_HIDE_HEADER</option>
</field>

<field name="category_addtocart" type="list" default="1" label="COM_PHOCACART_FIELD_ADD_TO_CART_CATEGORY_ITEMS_VIEW_LABEL" description="COM_PHOCACART_FIELD_ADD_TO_CART_CATEGORY_ITEMS_VIEW_DESC">
<option value="0">COM_PHOCACART_NO</option>
<option value="1">COM_PHOCACART_YES_STANDARD</option>
Expand Down Expand Up @@ -292,6 +309,20 @@
<field name="phocahead7" type="phocahead" default="COM_PHOCACART_GENERAL_DISPLAY_OPTIONS_LABEL" label="" description=""/>



<field name="display_header" type="list" default="h1" label="COM_PHOCACART_FIELD_DISPLAY_HEADER_LABEL" description="COM_PHOCACART_FIELD_DISPLAY_HEADER_DESC">
<option value="h1">h1</option>
<option value="h2">h2</option>
<option value="h3">h3</option>
<option value="h4">h4</option>
<option value="h5">h5</option>
<option value="h6">h6</option>
<option value="div">div</option>
<option value="p">p</option>
<option value="-1">COM_PHOCACART_HIDE_HEADER</option>
</field>


<field name="display_compare" type="radio" class="btn-group btn-group-yesno" default="0" label="COM_PHOCACART_FIELD_DISPLAY_COMPARE_ICON_LABEL" description="COM_PHOCACART_FIELD_DISPLAY_COMPARE_ICON_DESC">
<option value="1">COM_PHOCACART_YES</option>
<option value="0">COM_PHOCACART_NO</option>
Expand Down Expand Up @@ -453,9 +484,9 @@
<option value="1">COM_PHOCACART_CURRENT</option>
</field>

<field name="rounding_calculation" type="list" default="2" label="COM_PHOCACART_FIELD_ROUNDING_CALCULATION_LABEL" description="COM_PHOCACART_FIELD_ROUNDING_CALCULATION_DESC">
<option value="2">COM_PHOCACART_ROUND_HALF_UP</option>
<option value="1">COM_PHOCACART_ROUND_HALF_DOWN</option>
<field name="rounding_calculation" type="list" default="1" label="COM_PHOCACART_FIELD_ROUNDING_CALCULATION_LABEL" description="COM_PHOCACART_FIELD_ROUNDING_CALCULATION_DESC">
<option value="1">COM_PHOCACART_ROUND_HALF_UP</option>
<option value="2">COM_PHOCACART_ROUND_HALF_DOWN</option>
</field>

<field name="enable_coupons" type="list" default="1" label="COM_PHOCACART_FIELD_ENABLE_COUPONS_LABEL" description="COM_PHOCACART_FIELD_ENABLE_COUPONS_DESC">
Expand Down Expand Up @@ -709,6 +740,13 @@
<option value="2">COM_PHOCACART_YES_FORCE_ENABLE_WIZARD</option>
</field>

<field name="comma_point" type="list" default="0" label="COM_PHOCACART_FIELD_REPLACE_COMMA_WITH_POINT_LABEL" description="COM_PHOCACART_FIELD_REPLACE_COMMA_WITH_POINT_DESC">
<option value="1">COM_PHOCACART_YES</option>
<option value="0">COM_PHOCACART_NO</option>
</field>

<field name="upload_maxsize" type="phocatext" size="20" default="3145728" label="COM_PHOCACART_FIELD_MAXIMUM_SIZE_UPLOAD_FILE_LABEL" description="COM_PHOCACART_FIELD_MAXIMUM_SIZE_UPLOAD_FILE_DESC"/>



<field name="phocahead15" type="phocahead" default="COM_PHOCACART_CATALOG_OPTIONS_LABEL" label="" description=""/>
Expand Down
4 changes: 2 additions & 2 deletions controllers/phocacartcommons.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public function saveOrderAjax() {
// TEST per URL
//$pks = $this->input->get->get('cid', array(), 'array');
//$order = $this->input->get->get('order', array(), 'array');
//print_r($pks);
//print_r($order);
//print r($pks);
//print r($order);


JArrayHelper::toInteger($pks);
Expand Down
6 changes: 3 additions & 3 deletions help/en-GB/screen.phocacart.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ <h1>Phoca Cart</h1>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>
<a href="http://www.phoca.cz/phocacart/" target="_blank">Phoca Cart Main Site</a><br />
<a href="http://www.phoca.cz/documentation/" target="_blank">Phoca Cart User Manual</a><br />
<a href="http://www.phoca.cz/forum/" target="_blank">Phoca Cart Forum</a><br />
<a href="https://www.phoca.cz/phocacart/" target="_blank">Phoca Cart Main Site</a><br />
<a href="https://www.phoca.cz/documentation/" target="_blank">Phoca Cart User Manual</a><br />
<a href="https://www.phoca.cz/forum/" target="_blank">Phoca Cart Forum</a><br />
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
Expand Down
6 changes: 3 additions & 3 deletions help/screen.phocacart.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ <h1>Phoca Cart</h1>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>
<a href="http://www.phoca.cz/phocacart/" target="_blank">Phoca Cart Main Site</a><br />
<a href="http://www.phoca.cz/documentation/" target="_blank">Phoca Cart User Manual</a><br />
<a href="http://www.phoca.cz/forum/" target="_blank">Phoca Cart Forum</a><br />
<a href="https://www.phoca.cz/phocacart/" target="_blank">Phoca Cart Main Site</a><br />
<a href="https://www.phoca.cz/documentation/" target="_blank">Phoca Cart User Manual</a><br />
<a href="https://www.phoca.cz/forum/" target="_blank">Phoca Cart Forum</a><br />
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
Expand Down
4 changes: 2 additions & 2 deletions install/sql/mysql/countries.utf8.sql
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
-- -------------------------------------------------------------------- --
-- Phoca Cart Regions --
-- -------------------------------------------------------------------- --
-- See documentation on http://www.phoca.cz/ --
-- See documentation on https://www.phoca.cz/ --
-- --
-- Change all prefixes #__ to prefix which is set in your Joomla! site --
-- (e.g. from #__phocacart to jos_phocacart) --
-- Run this SQL queries in your database tool, e.g. in phpMyAdmin --
-- If you have questions, just ask in Phoca Forum --
-- http://www.phoca.cz/forum/ --
-- https://www.phoca.cz/forum/ --
-- -------------------------------------------------------------------- --

INSERT INTO `#__phocacart_countries` (`id`, `title`, `alias`, `type`, `code2`, `code3`, `published`, `checked_out`, `checked_out_time`, `ordering`, `params`, `language`) VALUES
Expand Down
30 changes: 27 additions & 3 deletions install/sql/mysql/install.utf8.sql
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
-- -------------------------------------------------------------------- --
-- Phoca Cart manual installation --
-- -------------------------------------------------------------------- --
-- See documentation on http://www.phoca.cz/ --
-- See documentation on https://www.phoca.cz/ --
-- --
-- Change all prefixes #__ to prefix which is set in your Joomla! site --
-- (e.g. from #__phocacart to #__phocacart) --
-- Run this SQL queries in your database tool, e.g. in phpMyAdmin --
-- If you have questions, just ask in Phoca Forum --
-- http://www.phoca.cz/forum/ --
-- https://www.phoca.cz/forum/ --
-- -------------------------------------------------------------------- --

CREATE TABLE IF NOT EXISTS `#__phocacart_categories` (
Expand All @@ -27,6 +27,7 @@ CREATE TABLE IF NOT EXISTS `#__phocacart_categories` (
`count` int(11) NOT NULL DEFAULT '0',
`hits` int(11) NOT NULL DEFAULT '0',
`params` text,
`metatitle` varchar(255) NOT NULL DEFAULT '',
`metakey` text,
`metadesc` text,
`metadata` text,
Expand Down Expand Up @@ -104,6 +105,7 @@ CREATE TABLE IF NOT EXISTS `#__phocacart_products` (
`points_received` int(11) NOT NULL DEFAULT '0',
`points_needed` int(11) NOT NULL DEFAULT '0',
`params` text,
`metatitle` varchar(255) NOT NULL DEFAULT '',
`metakey` text,
`metadesc` text,
`metadata` text,
Expand Down Expand Up @@ -871,7 +873,7 @@ CREATE TABLE IF NOT EXISTS `#__phocacart_orders` (
`currency_id` int(11) NOT NULL DEFAULT '0',
`tax_calculation` int(11) NOT NULL DEFAULT '0',
`currency_code` varchar(5) NOT NULL DEFAULT '',
`currency_exchange_rate` DECIMAL( 10, 4 ) NOT NULL DEFAULT '0',
`currency_exchange_rate` DECIMAL( 15, 8 ) NOT NULL DEFAULT '0',
`unit_weight` varchar(50) NOT NULL DEFAULT '',
`unit_volume` varchar(50) NOT NULL DEFAULT '',
`title` varchar(255) NOT NULL DEFAULT '',
Expand Down Expand Up @@ -954,6 +956,7 @@ CREATE TABLE IF NOT EXISTS `#__phocacart_order_products` (
`points_needed` int(11) NOT NULL DEFAULT '0',
`default_price` DECIMAL( 10, 4 ) NOT NULL DEFAULT '0',
`default_tax_rate` DECIMAL( 10, 4 ) NOT NULL DEFAULT '0',
`default_tax_id` int(11) NOT NULL DEFAULT '0',
`default_calculation_type` tinyint(1) NOT NULL DEFAULT '0',
`default_points_received` int(11) NOT NULL DEFAULT '0',
`published` tinyint(1) NOT NULL DEFAULT '0',
Expand Down Expand Up @@ -1030,9 +1033,11 @@ CREATE TABLE IF NOT EXISTS `#__phocacart_order_product_discounts` (
CREATE TABLE IF NOT EXISTS `#__phocacart_order_total` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`order_id` int(11) NOT NULL DEFAULT '0',
`item_id` int(11) NOT NULL DEFAULT '0',
`title` varchar(255) NOT NULL DEFAULT '',
`type` varchar(50) NOT NULL DEFAULT '',
`amount` DECIMAL( 15, 4 ) NOT NULL DEFAULT '0',
`amount_currency` DECIMAL( 15, 4 ) NOT NULL DEFAULT '0',
`text` varchar(255) NOT NULL DEFAULT '',
`checked_out` int(11) unsigned NOT NULL DEFAULT '0',
`checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
Expand Down Expand Up @@ -2003,3 +2008,22 @@ INSERT INTO `#__phocacart_groups` (`id`, `title`, `published`, `display_price`,
-- ALTER TABLE `#__phocacart_shipping_methods` ADD `active_size` tinyint(1) NOT NULL DEFAULT '0';


-- ---------
-- RC8 -> RC9
-- ---------

-- ALTER TABLE `#__phocacart_currencies` CHANGE `exchange_rate` `exchange_rate` DECIMAL( 15, 8 ) NOT NULL DEFAULT '0';
-- ALTER TABLE `#__phocacart_orders` CHANGE `currency_exchange_rate` `currency_exchange_rate` DECIMAL( 15, 8 ) NOT NULL DEFAULT '0';

-- ALTER TABLE `#__phocacart_order_total` ADD `amount_currency` DECIMAL( 15, 4 ) NOT NULL DEFAULT '0';
-- ALTER TABLE `#__phocacart_order_products` ADD `default_tax_id` int(11) NOT NULL DEFAULT '0';

-- ALTER TABLE `#__phocacart_categories` ADD `metatitle` varchar(255) NOT NULL DEFAULT '';
-- ALTER TABLE `#__phocacart_products` ADD `metatitle` varchar(255) NOT NULL DEFAULT '';

-- ALTER TABLE `#__phocacart_order_total` ADD `item_id` int(11) NOT NULL DEFAULT '0';





4 changes: 2 additions & 2 deletions install/sql/mysql/regions.utf8.sql
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
-- -------------------------------------------------------------------- --
-- Phoca Cart Regions --
-- -------------------------------------------------------------------- --
-- See documentation on http://www.phoca.cz/ --
-- See documentation on https://www.phoca.cz/ --
-- --
-- Change all prefixes #__ to prefix which is set in your Joomla! site --
-- (e.g. from #__phocacart to jos_phocacart) --
-- Run this SQL queries in your database tool, e.g. in phpMyAdmin --
-- If you have questions, just ask in Phoca Forum --
-- http://www.phoca.cz/forum/ --
-- https://www.phoca.cz/forum/ --
-- -------------------------------------------------------------------- --


Expand Down
18 changes: 18 additions & 0 deletions language/en-GB/en-GB.com_phocacart.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,24 @@ COM_PHOCACART_ORDER_PAYMENT_PROCESSED_ADDITIONAL_INFO=""
COM_PHOCACART_ORDER_PAYMENT_PROCESSED_DOWNLOADABLE_ITEMS_ADDITIONAL_INFO=""
COM_PHOCACART_ORDER_PAYMENT_CANCELED_ADDITIONAL_INFO=""

;[3.0.0 RC9]
COM_PHOCACART_NO_PRODUCT="No Product"
COM_PHOCACART_NO_CATEGORY="No Category"
COM_PHOCACART_HIDE_HEADER="Hide Header"
COM_PHOCACART_FIELD_DISPLAY_HEADER_LABEL="Display Header"
COM_PHOCACART_FIELD_DISPLAY_HEADER_DESC="Display or hide header. Set which tag shall be used for header."
COM_PHOCACART_FIELD_DISPLAY_PRODUCT_HEADER_CAREGORY_LABEL="Display Product Header (Category, Items View)"
COM_PHOCACART_FIELD_DISPLAY_PRODUCT_HEADER_CAREGORY_DESC="Display or hide product header in Category or Items view. Set which tag shall be used for header."
COM_PHOCACART_FIELD_DISPLAY_PRODUCT_DESCRIPTION_CATEGORY_LABEL="Display Description (Category, Items View)"
COM_PHOCACART_FIELD_DISPLAY_PRODUCT_DESCRIPTION_CATEGORY_DESC="Display or hide product description in Category or Items view"

COM_PHOCACART_FIELD_MAXIMUM_SIZE_UPLOAD_FILE_DESC="The maximal size for an upload (in bytes). Use zero for no limit."
COM_PHOCACART_FIELD_MAXIMUM_SIZE_UPLOAD_FILE_LABEL="Maximal Upload Size"
COM_PHOCACART_CURRENCY_ROUNDING="Currency Rounding"
COM_PHOCACART_ROUNDING_CURRENCY="Rounding (Currency)"
COM_PHOCACART_ROUNDING_CURRENCY_NOT_STORED_IN_DEFAULT_CURRENCY_BUT_ORDER_CURRENCY="Rounding (Currency) value is not stored in default currency like other values but in the currency of the order. Currency rounding is different for each currency. This affects total amount. Total amount may be different for different currencies because of rounding."
COM_PHOCACART_FIELD_REPLACE_COMMA_WITH_POINT_LABEL="Replace Comma With Point"
COM_PHOCACART_FIELD_REPLACE_COMMA_WITH_POINT_DESC="Replace decimal comma with a point. Prices in the database are saved with the point. If user enters price with decimal comma, set whether it will be replaced with the point or not."

;[3.0.0 RC8]
COM_PHOCACART_ALL_CUSTOMERS="All customers"
Expand Down
2 changes: 1 addition & 1 deletion layouts/product_import.php
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ function filter_xml($matches) {

}


$newId = PhocacartProduct::storeProduct($data, $import_column);
if ($newId > 0) {
$productIdChange[$newId] = $data['id'];
Expand Down
13 changes: 8 additions & 5 deletions libraries/phocacart/access/access.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<?php
/* @package Joomla
/**
* @package Phoca Cart
* @author Jan Pavelka - https://www.phoca.cz
* @copyright Copyright (C) Jan Pavelka https://www.phoca.cz
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 and later
* @cms Joomla
* @copyright Copyright (C) Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* @extension Phoca Extension
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*/

defined('_JEXEC') or die();

class PhocacartAccess
Expand Down
28 changes: 19 additions & 9 deletions libraries/phocacart/attribute/attribute.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<?php
/* @package Joomla
/**
* @package Phoca Cart
* @author Jan Pavelka - https://www.phoca.cz
* @copyright Copyright (C) Jan Pavelka https://www.phoca.cz
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 and later
* @cms Joomla
* @copyright Copyright (C) Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* @extension Phoca Extension
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die();

Expand Down Expand Up @@ -214,7 +216,7 @@ public static function storeAttributesById($productId, $attributesArray, $new =
if (empty($v2['amount'])) {$v2['amount'] = '';}
if (empty($v2['stock'])) {$v2['stock'] = '';}
if (empty($v2['operator_weight'])) {$v2['operator_weight'] = '';}
if (empty($v2['weight'])) {$v2['weight'] = '';}
if (empty($v2['weight'])) {$v2['weight'] = '0.0';}
if (empty($v2['image'])) {$v2['image'] = '';}
if (empty($v2['image_small'])) {$v2['image_small'] = '';}
if (empty($v2['color'])) {$v2['color'] = '';}
Expand All @@ -237,7 +239,11 @@ public static function storeAttributesById($productId, $attributesArray, $new =
}

if ((int)$idExists > 0) {



$v2['amount'] = PhocacartUtils::replaceCommaWithPoint($v2['amount']);
$v2['weight'] = PhocacartUtils::replaceCommaWithPoint($v2['weight']);

$query = 'UPDATE #__phocacart_attribute_values SET'
.' attribute_id = '.(int)$newIdA.','
.' title = '.$db->quote($v2['title']).','
Expand All @@ -252,13 +258,17 @@ public static function storeAttributesById($productId, $attributesArray, $new =
.' color = '.$db->quote($v2['color']).','
.' default_value = '.(int)$defaultValue
.' WHERE id = '.(int)$idExists;


$db->setQuery($query);
$db->execute();

$newIdO = $idExists;

} else {


$v2['amount'] = PhocacartUtils::replaceCommaWithPoint($v2['amount']);
$v2['weight'] = PhocacartUtils::replaceCommaWithPoint($v2['weight']);

$options = '('.(int)$newIdA.', '.$db->quote($v2['title']).', '.$db->quote($v2['alias']).', '.$db->quote($v2['operator']).', '.$db->quote($v2['amount']).', '.(int)$v2['stock'].', '.$db->quote($v2['operator_weight']).', '.$db->quote($v2['weight']).', '.$db->quote($v2['image']).', '.$db->quote($v2['image_small']).', '.$db->quote($v2['color']).', '.(int)$defaultValue.')';

Expand Down Expand Up @@ -497,7 +507,7 @@ public static function getAllAttributesAndOptions($ordering = 1) {
$query = 'SELECT v.id, v.title, v.alias, v.image, v.image_small, v.color, v.default_value, at.id AS attrid, at.title AS attrtitle, at.alias AS attralias, at.type as attrtype'
.' FROM #__phocacart_attribute_values AS v'
.' LEFT JOIN #__phocacart_attributes AS at ON at.id = v.attribute_id'
.' GROUP BY v.alias, attralias'
.' GROUP BY v.alias, attralias, v.id, v.title, v.image, v.image_small, v.color, v.default_value, at.id, at.title, at.alias, at.type'
.' ORDER BY '.$orderingText;
$db->setQuery($query);
$attributes = $db->loadObjectList();
Expand Down
13 changes: 8 additions & 5 deletions libraries/phocacart/captcha/captcha.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<?php
/**
* @package phocaguestbook
* @subpackage Models
* @copyright Copyright (C) 2012 Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @package Phoca Cart
* @author Jan Pavelka - https://www.phoca.cz
* @copyright Copyright (C) Jan Pavelka https://www.phoca.cz
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 and later
* @cms Joomla
* @copyright Copyright (C) Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*/
defined('JPATH_BASE') or die;

Expand All @@ -12,7 +15,7 @@ class PhocacartCaptcha
public static function enableCaptchaCheckout() {

$document = JFactory::getDocument();
$pC = JComponentHelper::getParams('com_phocacart') ;
$pC = PhocacartUtils::getComponentParameters();
$enable_captcha_checkout = $pC->get( 'enable_captcha_checkout', 0 );

//$user = JFactory::getUser();
Expand Down
Loading

0 comments on commit 2ef0b80

Please sign in to comment.