From 3e3dfeeae60543ed4735afd8a72ae9c83e640744 Mon Sep 17 00:00:00 2001 From: vshandak Date: Tue, 17 May 2022 15:52:34 +0300 Subject: [PATCH 01/14] first J4 try --- component/admin/controllers/category.php | 23 +- component/admin/controllers/product_price.php | 2 +- component/admin/controllers/rating.php | 20 +- .../admin/controllers/xmlexport_detail.php | 2 +- component/admin/layouts/component/assets.php | 2 +- component/admin/layouts/pagination/link.php | 4 +- .../product_detail/product_attribute.php | 2 +- .../admin/layouts/shopper_group/logo.php | 2 +- component/admin/layouts/wrapper/image.php | 2 +- component/admin/models/accountgroup.php | 2 +- component/admin/models/attribute_set.php | 2 +- component/admin/models/attributeprices.php | 2 +- component/admin/models/catalog_request.php | 2 +- component/admin/models/category.php | 12 +- component/admin/models/prices.php | 2 +- component/admin/models/product_detail.php | 4 +- component/admin/models/producttags.php | 2 +- component/admin/models/quotation.php | 8 - component/admin/models/sample_request.php | 2 +- component/admin/models/shipping_rate.php | 2 +- component/admin/models/stockimage.php | 2 +- component/admin/models/user_detail.php | 2 +- component/admin/models/xmlexport.php | 2 +- component/admin/models/xmlimport.php | 2 +- component/admin/sql/install/mysql/data.sql | 7 +- component/admin/sql/install/mysql/install.sql | 40 +- component/admin/sql/updates/mysql/2.0.0.6.sql | 2 +- component/admin/sql/updates/mysql/2.0.12.sql | 2 +- component/admin/sql/updates/mysql/2.0.15.sql | 18 +- component/admin/sql/updates/mysql/2.0.6.sql | 4 +- component/admin/sql/updates/mysql/2.1.2.sql | 2 +- .../admin/views/accountgroup/view.html.php | 2 +- .../admin/views/addorder_detail/view.html.php | 10 +- .../views/addquotation_detail/view.html.php | 10 +- component/admin/views/alert/view.html.php | 2 +- .../admin/views/attribute_set/view.html.php | 2 +- .../views/attribute_set_detail/view.html.php | 8 +- .../admin/views/attributeprices/view.html.php | 4 +- .../attributeprices_detail/view.html.php | 2 +- .../admin/views/catalog_request/view.html.php | 2 +- .../admin/views/catalogs/tmpl/default.php | 2 +- component/admin/views/category/tmpl/edit.php | 2 +- .../views/category/tmpl/edit_extrafield.php | 2 +- component/admin/views/category/view.html.php | 8 +- .../default_cart_template_image_setting.php | 2 +- .../tmpl/default_cattab_nplinks.php | 2 +- .../tmpl/default_procat_images.php | 2 +- .../tmpl/default_registration.php | 2 +- .../tmpl/default_shopper_group.php | 2 +- .../admin/views/configuration/view.html.php | 2 +- component/admin/views/field/view.html.php | 2 +- component/admin/views/giftcard/tmpl/edit.php | 2 +- .../admin/views/giftcards/tmpl/default.php | 2 +- component/admin/views/import/tmpl/default.php | 4 +- .../admin/views/media/tmpl/additionalfile.php | 2 +- component/admin/views/media/tmpl/default.php | 2 +- component/admin/views/media/view.html.php | 6 +- .../admin/views/media_detail/tmpl/default.php | 4 +- .../admin/views/media_detail/view.html.php | 2 +- .../newsletter_subscriptions/tmpl/default.php | 2 +- .../admin/views/newsletters/tmpl/default.php | 2 +- component/admin/views/order/view.html.php | 2 +- .../admin/views/order_detail/tmpl/default.php | 4 +- .../admin/views/order_detail/view.html.php | 10 +- component/admin/views/plugins/view.html.php | 2 +- component/admin/views/prices/view.html.php | 4 +- .../admin/views/prices_detail/view.html.php | 2 +- .../admin/views/product/tmpl/default.php | 2 +- .../admin/views/product/tmpl/listing.php | 2 +- component/admin/views/product/view.html.php | 2 +- .../product_attribute_price/view.html.php | 4 +- .../views/product_detail/tmpl/default.php | 2 +- .../tmpl/default_calculator.php | 4 +- .../tmpl/default_general_data.php | 6 +- .../admin/views/product_detail/view.html.php | 12 +- .../admin/views/product_price/view.html.php | 2 +- .../admin/views/producttags/view.html.php | 2 +- .../views/producttags_detail/view.html.php | 2 +- .../admin/views/promotions/tmpl/default.php | 2 +- component/admin/views/questions/view.html.php | 2 +- .../views/quotation_detail/tmpl/default.php | 2 +- .../views/quotation_detail/view.html.php | 8 +- .../admin/views/ratings/tmpl/default.php | 2 +- component/admin/views/sample/tmpl/edit.php | 2 +- .../admin/views/sample_catalog/view.html.php | 2 +- .../views/sample_request/tmpl/default.php | 2 +- .../admin/views/sample_request/view.html.php | 2 +- component/admin/views/search/view.html.php | 4 +- .../views/shipping_methods/tmpl/default.php | 2 +- .../shipping_rate_detail/tmpl/default.php | 2 +- .../views/shipping_rate_detail/view.html.php | 2 +- .../views/shoppergroups/tmpl/default.php | 2 +- component/admin/views/statistic/view.html.php | 4 +- .../views/statistic_quotation/view.html.php | 8 +- .../views/statistic_variant/view.html.php | 8 +- .../admin/views/stockimage/view.html.php | 2 +- .../views/stockimage_detail/view.html.php | 2 +- .../views/stockroom_listing/view.html.php | 2 +- .../admin/views/stockrooms/tmpl/default.php | 2 +- component/admin/views/user/view.html.php | 2 +- .../admin/views/user_detail/view.html.php | 6 +- .../admin/views/wizard/tmpl/price_vat.php | 2 +- component/admin/views/wizard/tmpl/terms.php | 2 +- .../views/wizard/tmpl/user_shopper_group.php | 2 +- component/admin/views/wizard/view.html.php | 6 +- .../admin/views/wrappers/tmpl/default.php | 2 +- component/admin/views/xmlexport/view.html.php | 2 +- .../views/xmlexport_detail/tmpl/default.php | 2 +- .../views/xmlexport_detail/view.html.php | 2 +- component/admin/views/xmlimport/view.html.php | 2 +- .../views/xmlimport_detail/view.html.php | 2 +- .../admin/views/zipcodes/tmpl/default.php | 2 +- component/site/controllers/order_detail.php | 2 +- component/site/controllers/product.php | 2 +- component/site/layouts/assets.php | 10 +- .../site/layouts/joomla/pagination/link.php | 2 +- .../site/layouts/product/product_rating.php | 2 +- .../site/layouts/registration/captcha.php | 2 +- component/site/models/account.php | 6 +- component/site/models/category.php | 6 +- component/site/models/checkout.php | 2 +- component/site/models/manufacturers.php | 4 +- component/site/models/orders.php | 2 +- component/site/models/product_mini.php | 4 +- component/site/models/ratings.php | 2 +- component/site/models/search.php | 12 +- component/site/views/account/view.html.php | 6 +- .../site/views/account_billto/view.html.php | 4 +- component/site/views/cart/tmpl/default.php | 2 +- component/site/views/cart/view.html.php | 2 +- .../views/category/tmpl/categoryproduct.php | 2 +- .../site/views/category/tmpl/default.php | 2 +- component/site/views/category/tmpl/detail.php | 2 +- component/site/views/category/view.html.php | 2 +- .../site/views/checkout/tmpl/default.php | 2 +- .../checkout/tmpl/default_checkoutnext.php | 2 +- .../views/checkout/tmpl/default_payment.php | 2 +- .../views/checkout/tmpl/default_shipping.php | 2 +- .../views/checkout/tmpl/onestepcheckout.php | 6 +- component/site/views/checkout/view.html.php | 16 +- component/site/views/checkout/view.next.php | 2 +- .../site/views/giftcard/tmpl/default.php | 2 +- .../site/views/manufacturers/tmpl/default.php | 2 +- .../site/views/manufacturers/tmpl/detail.php | 2 +- .../views/manufacturers/tmpl/products.php | 2 +- component/site/views/orders/tmpl/default.php | 2 +- .../site/views/price_filter/tmpl/default.php | 2 +- component/site/views/product/tmpl/compare.php | 2 +- component/site/views/product/tmpl/default.php | 2 +- .../views/product/tmpl/downloadproduct.php | 2 +- .../views/product/tmpl/viewajaxdetail.php | 2 +- .../site/views/product/tmpl/viewwishlist.php | 2 +- component/site/views/product/view.html.php | 4 +- .../site/views/product_mini/view.html.php | 2 +- component/site/views/quotation/view.html.php | 4 +- .../site/views/registration/view.html.php | 10 +- component/site/views/search/tmpl/default.php | 4 +- .../site/views/search/tmpl/productonsale.php | 4 +- component/site/views/search/view.html.php | 4 +- .../site/views/send_friend/tmpl/default.php | 4 +- .../site/views/send_friend/view.html.php | 2 +- .../site/views/wishlist/tmpl/default.php | 2 +- .../views/wishlist/tmpl/viewloginwishlist.php | 2 +- .../site/views/wishlist/tmpl/viewwishlist.php | 2 +- gulpfile.js | 4 +- install.php | 28 +- libraries/redshop/controller/form.php | 172 +- libraries/redshop/form/fields/products.php | 2 +- libraries/redshop/form/fields/rdaterange.php | 6 +- libraries/redshop/helper/config.php | 2 +- libraries/redshop/helper/extrafields.php | 4 +- libraries/redshop/helper/joomla.php | 6 +- libraries/redshop/helper/media/image.php | 18 +- libraries/redshop/helper/order.php | 16 - libraries/redshop/helper/product.php | 2 +- libraries/redshop/helper/shipping.php | 2 +- libraries/redshop/helper/user.php | 9 +- libraries/redshop/helper/utility.php | 53 +- libraries/redshop/helper/world.php | 14 - libraries/redshop/html/redshopcalendar.php | 10 +- libraries/redshop/html/redshopgrid.php | 2 +- libraries/redshop/html/redshopjquery.php | 18 +- libraries/redshop/html/redshopmedia.php | 2 +- libraries/redshop/html/redshopselect.php | 4 +- libraries/redshop/html/redshopsortable.php | 4 +- libraries/redshop/layout/file.php | 2 +- .../extrafields/userfield/document.php | 2 +- .../tags/ask_question/ask_question.html.twig | 2 +- libraries/redshop/model/form.php | 2 +- libraries/redshop/model/list.php | 10 +- libraries/redshop/model/model.php | 6 +- libraries/redshop/src/Cron/Product.php | 1 + libraries/redshop/src/Helper/Utility.php | 2 +- .../redshop/src/Loader/ExtensionLoader.php | 2 +- libraries/redshop/src/Shipping/Tag.php | 2 +- libraries/redshop/src/Table/AbstractTable.php | 11 +- libraries/redshop/table/nested.php | 8 +- libraries/redshop/table/table.php | 2 +- libraries/redshop/tags/sections/cart.php | 2 +- .../redshop/tags/sections/categorydetail.php | 2 +- libraries/redshop/tags/sections/product.php | 2 +- libraries/redshop/tags/sections/wishlist.php | 2 +- .../redshop/toolbar/button/redshoplink.php | 2 +- libraries/redshop/toolbar/helper.php | 15 +- libraries/redshop/view/list.php | 2 +- .../mod_redshop_search/mod_redshop_search.php | 6 +- package-lock.json | 1912 +++++++++-------- package.json | 19 +- .../redshop/sef.php | 2 +- .../redgoogleanalytics/redgoogleanalytics.php | 4 +- plugins/system/redshop/redshop.php | 2 +- plugins/twig/cache/cache.php | 2 +- .../extensions/plugins/redshop_pdf/tcpdf.js | 2 +- 213 files changed, 1458 insertions(+), 1568 deletions(-) diff --git a/component/admin/controllers/category.php b/component/admin/controllers/category.php index ca6b7bf9d3c..180200024be 100644 --- a/component/admin/controllers/category.php +++ b/component/admin/controllers/category.php @@ -67,9 +67,7 @@ public function save($key = null, $urlVar = null) if (!$this->checkEditId($context, $recordId)) { // Somehow the person just went to the form and tried to save it. We don't allow that. - /** @scrutinizer ignore-deprecated */ - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $recordId)); - $this->setMessage(/** @scrutinizer ignore-deprecated */ $this->getError(), 'error'); + $this->setMessage(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $recordId), 'error'); // Redirect to the list screen $this->setRedirect( @@ -87,8 +85,7 @@ public function save($key = null, $urlVar = null) // Check-in the original row. if ($checkin && $model->checkin($data[$key]) === false) { // Check-in failed. Go back to the item and display a notice. - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_CHECKIN_FAILED', $model->getError())); - $this->setMessage($this->getError(), 'error'); + $this->setMessage(JText::sprintf('JLIB_APPLICATION_ERROR_CHECKIN_FAILED', $model->getError()), 'error'); // Redirect back to the edit screen. $this->setRedirect( @@ -106,9 +103,7 @@ public function save($key = null, $urlVar = null) // Access check. if (!$this->allowSave($data, $key)) { - /** @scrutinizer ignore-deprecated */ - $this->setError(JText::_('JLIB_APPLICATION_ERROR_SAVE_NOT_PERMITTED')); - $this->setMessage(/** @scrutinizer ignore-deprecated */ $this->getError(), 'error'); + $this->setMessage(JText::_('JLIB_APPLICATION_ERROR_SAVE_NOT_PERMITTED'), 'error'); // Redirect to the list screen $this->setRedirect( @@ -167,9 +162,7 @@ public function save($key = null, $urlVar = null) $app->setUserState($context . '.data', $validData); // Redirect back to the edit screen. - /** @scrutinizer ignore-deprecated */ - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_SAVE_FAILED', $model->getError())); - $this->setMessage(/** @scrutinizer ignore-deprecated */ $this->getError(), 'error'); + $this->setMessage(JText::sprintf('JLIB_APPLICATION_ERROR_SAVE_FAILED', $model->getError()), 'error'); // Redirect back to the edit screen. $this->setRedirect( @@ -185,9 +178,7 @@ public function save($key = null, $urlVar = null) $app->setUserState($context . '.data', $validData); // Check-in failed, so go back to the record and display a notice. - /** @scrutinizer ignore-deprecated */ - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_CHECKIN_FAILED', $model->getError())); - $this->setMessage(/** @scrutinizer ignore-deprecated */ $this->getError(), 'error'); + $this->setMessage(JText::sprintf('JLIB_APPLICATION_ERROR_CHECKIN_FAILED', $model->getError()), 'error'); // Redirect back to the edit screen. $this->setRedirect( @@ -200,10 +191,10 @@ public function save($key = null, $urlVar = null) $this->setMessage( JText::_( ($lang->hasKey( - $this->text_prefix . ($recordId == 0 && $app->isSite() ? '_SUBMIT' : '') . '_SAVE_SUCCESS' + $this->text_prefix . ($recordId == 0 && $app->isClient('site') ? '_SUBMIT' : '') . '_SAVE_SUCCESS' ) ? $this->text_prefix - : 'JLIB_APPLICATION') . ($recordId == 0 && $app->isSite() ? '_SUBMIT' : '') . '_SAVE_SUCCESS' + : 'JLIB_APPLICATION') . ($recordId == 0 && $app->isClient('site') ? '_SUBMIT' : '') . '_SAVE_SUCCESS' ) ); diff --git a/component/admin/controllers/product_price.php b/component/admin/controllers/product_price.php index 24ac0dd6435..5490706a16c 100644 --- a/component/admin/controllers/product_price.php +++ b/component/admin/controllers/product_price.php @@ -97,7 +97,7 @@ public function saveprice() if ($xid && $xid != $priceId[$i]) { echo $xid; - $this->setError(JText::sprintf('WARNNAMETRYAGAIN', JText::_('COM_REDSHOP_PRICE_ALREADY_EXISTS'))); + $this->setMessage(JText::sprintf('WARNNAMETRYAGAIN', JText::_('COM_REDSHOP_PRICE_ALREADY_EXISTS')), 'error'); } if (!empty($priceId[$i])) { diff --git a/component/admin/controllers/rating.php b/component/admin/controllers/rating.php index e37d79ec268..96e8bee05a1 100644 --- a/component/admin/controllers/rating.php +++ b/component/admin/controllers/rating.php @@ -65,9 +65,7 @@ public function save($key = null, $urlVar = null) if (!$this->checkEditId($context, $recordId)) { // Somehow the person just went to the form and tried to save it. We don't allow that. - /** @scrutinizer ignore-deprecated */ - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $recordId)); - $this->setMessage(/** @scrutinizer ignore-deprecated */ $this->getError(), 'error'); + $this->setMessage(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $recordId), 'error'); // Redirect to the list screen $this->setRedirect( @@ -85,9 +83,7 @@ public function save($key = null, $urlVar = null) // Check-in the original row. if ($checkin && $model->checkin($data[$key]) === false) { // Check-in failed. Go back to the item and display a notice. - /** @scrutinizer ignore-deprecated */ - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_CHECKIN_FAILED', $model->getError())); - $this->setMessage(/** @scrutinizer ignore-deprecated */ $this->getError(), 'error'); + $this->setMessage(JText::sprintf('JLIB_APPLICATION_ERROR_CHECKIN_FAILED', $model->getError()), 'error'); // Redirect back to the edit screen. $this->setRedirect( @@ -105,9 +101,7 @@ public function save($key = null, $urlVar = null) // Access check. if (!$this->allowSave($data, $key)) { - /** @scrutinizer ignore-deprecated */ - $this->setError(JText::_('JLIB_APPLICATION_ERROR_SAVE_NOT_PERMITTED')); - $this->setMessage(/** @scrutinizer ignore-deprecated */ $this->getError(), 'error'); + $this->setMessage(JText::_('JLIB_APPLICATION_ERROR_SAVE_NOT_PERMITTED'), 'error'); // Redirect to the list screen $this->setRedirect( @@ -165,9 +159,7 @@ public function save($key = null, $urlVar = null) $app->setUserState($context . '.data', $validData); // Redirect back to the edit screen. - /** @scrutinizer ignore-deprecated */ - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_SAVE_FAILED', $model->getError())); - $this->setMessage(/** @scrutinizer ignore-deprecated */ $this->getError(), 'error'); + $this->setMessage(JText::sprintf('JLIB_APPLICATION_ERROR_SAVE_FAILED', $model->getError()), 'error'); // Redirect back to the edit screen. $this->setRedirect( @@ -183,9 +175,7 @@ public function save($key = null, $urlVar = null) $app->setUserState($context . '.data', $validData); // Check-in failed, so go back to the record and display a notice. - /** @scrutinizer ignore-deprecated */ - $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_CHECKIN_FAILED', $model->getError())); - $this->setMessage(/** @scrutinizer ignore-deprecated */ $this->getError(), 'error'); + $this->setMessage(JText::sprintf('JLIB_APPLICATION_ERROR_CHECKIN_FAILED', $model->getError()), 'error'); // Redirect back to the edit screen. $this->setRedirect( diff --git a/component/admin/controllers/xmlexport_detail.php b/component/admin/controllers/xmlexport_detail.php index 09dcdb3cde1..67018a27ad9 100644 --- a/component/admin/controllers/xmlexport_detail.php +++ b/component/admin/controllers/xmlexport_detail.php @@ -104,7 +104,7 @@ public function save($export = 0) function setChildElement() { - JHtml::_('behavior.modal'); + JHtml::_('rbootstrap.modal'); $xmlhelper = new xmlHelper; $post = $this->input->post->getArray(); diff --git a/component/admin/layouts/component/assets.php b/component/admin/layouts/component/assets.php index b9f492337ec..91af291358e 100644 --- a/component/admin/layouts/component/assets.php +++ b/component/admin/layouts/component/assets.php @@ -9,7 +9,7 @@ defined('_JEXEC') or die; -JHtml::_('behavior.framework'); +JHtml::_('rjquery.framework'); JHtml::_('bootstrap.tooltip'); JHtml::_( 'redshopjquery.select2', diff --git a/component/admin/layouts/pagination/link.php b/component/admin/layouts/pagination/link.php index 49a35f6ef0e..1990fc4e224 100644 --- a/component/admin/layouts/pagination/link.php +++ b/component/admin/layouts/pagination/link.php @@ -9,7 +9,7 @@ */ defined('_JEXEC') or die; -/** @var JPaginationObject $item */ +/** @var \RPaginationObject $item */ $item = $displayData['data']; $display = $item->text; @@ -76,7 +76,7 @@ $href = trim($item->link); // Still using javascript approach in backend - if (JFactory::getApplication()->isAdmin()) { + if (JFactory::getApplication()->isClient('administrator')) { $onClick = 'onclick="document.adminForm.' . $item->prefix . $limit . '; Joomla.submitform(document.forms[\'' . $item->formName . '\'].task.value, document.forms[\'' . $item->formName . '\']);return false;"'; $href = '#'; diff --git a/component/admin/layouts/product_detail/product_attribute.php b/component/admin/layouts/product_detail/product_attribute.php index bfa5909a388..d1a0eb27adf 100644 --- a/component/admin/layouts/product_detail/product_attribute.php +++ b/component/admin/layouts/product_detail/product_attribute.php @@ -9,7 +9,7 @@ */ defined('_JEXEC') or die; -JHtmlBehavior::modal('a.joom-box'); +JHtml::_('rbootstrap.modal', 'a.joom-box'); $data = $displayData['this']; $productId = 0; $attributeSetId = 0; diff --git a/component/admin/layouts/shopper_group/logo.php b/component/admin/layouts/shopper_group/logo.php index caae74914c5..744f728aed1 100644 --- a/component/admin/layouts/shopper_group/logo.php +++ b/component/admin/layouts/shopper_group/logo.php @@ -8,7 +8,7 @@ * @license GNU General Public License version 2 or later; see LICENSE */ defined('_JEXEC') or die; -JHtml::_('behavior.modal', 'a.joom-box'); +JHtml::_('rbootstrap.modal', 'a.joom-box'); /** * Layout variables * ====================================== diff --git a/component/admin/layouts/wrapper/image.php b/component/admin/layouts/wrapper/image.php index facb0b04f02..faccb7095c0 100644 --- a/component/admin/layouts/wrapper/image.php +++ b/component/admin/layouts/wrapper/image.php @@ -8,7 +8,7 @@ * @license GNU General Public License version 2 or later; see LICENSE */ defined('_JEXEC') or die; -JHtml::_('behavior.modal', 'a.joom-box'); +JHtml::_('rbootstrap.modal', 'a.joom-box'); /** * Layout variables * ====================================== diff --git a/component/admin/models/accountgroup.php b/component/admin/models/accountgroup.php index 750a40ac4f5..1e9e560e496 100644 --- a/component/admin/models/accountgroup.php +++ b/component/admin/models/accountgroup.php @@ -82,7 +82,7 @@ public function getPagination() { if (empty($this->_pagination)) { jimport('joomla.html.pagination'); - $this->_pagination = new JPagination( + $this->_pagination = new \RPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') diff --git a/component/admin/models/attribute_set.php b/component/admin/models/attribute_set.php index 69f962de5cc..48f54c661a2 100644 --- a/component/admin/models/attribute_set.php +++ b/component/admin/models/attribute_set.php @@ -80,7 +80,7 @@ public function getPagination() { if (empty($this->_pagination)) { jimport('joomla.html.pagination'); - $this->_pagination = new JPagination( + $this->_pagination = new \RPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') diff --git a/component/admin/models/attributeprices.php b/component/admin/models/attributeprices.php index 7d123661df8..9fa68a05891 100644 --- a/component/admin/models/attributeprices.php +++ b/component/admin/models/attributeprices.php @@ -90,7 +90,7 @@ public function getPagination() { if (empty($this->_pagination)) { jimport('joomla.html.pagination'); - $this->_pagination = new JPagination( + $this->_pagination = new \RPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') diff --git a/component/admin/models/catalog_request.php b/component/admin/models/catalog_request.php index 43945323a4e..7ccecb0d2f2 100644 --- a/component/admin/models/catalog_request.php +++ b/component/admin/models/catalog_request.php @@ -81,7 +81,7 @@ public function getPagination() { if (empty($this->_pagination)) { jimport('joomla.html.pagination'); - $this->_pagination = new JPagination( + $this->_pagination = new \RPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') diff --git a/component/admin/models/category.php b/component/admin/models/category.php index 76a498bd17e..e26cf4c10d8 100644 --- a/component/admin/models/category.php +++ b/component/admin/models/category.php @@ -63,7 +63,7 @@ public function getForm($data = array(), $loadData = true) public function getExtraFields($item) { $templateDesc = RedshopHelperTemplate::getTemplate('category', $item->template, ''); - $template = $templateDesc[0]->template_desc; + $template = $templateDesc[0]->template_desc ?? ''; $regex = '/{rs_[\w]{1,}\}/'; preg_match_all($regex, $template, $matches); @@ -215,9 +215,13 @@ public function saveCategory(&$data) $row->setOption('media', $dropzoneMedia); } - if (!$row->store()) { - return false; - } + if (!$row->store()) + { + /** @scrutinizer ignore-deprecated */ + $this->setError(/** @scrutinizer ignore-deprecated */ $row->getError()); + + return false; + } $data['id'] = $row->id; diff --git a/component/admin/models/prices.php b/component/admin/models/prices.php index bbfe0f25102..25868ce3a65 100644 --- a/component/admin/models/prices.php +++ b/component/admin/models/prices.php @@ -85,7 +85,7 @@ public function getPagination() { if (empty($this->_pagination)) { jimport('joomla.html.pagination'); - $this->_pagination = new JPagination( + $this->_pagination = new \RPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') diff --git a/component/admin/models/product_detail.php b/component/admin/models/product_detail.php index 702fa5bdb2f..914ea3159a1 100644 --- a/component/admin/models/product_detail.php +++ b/component/admin/models/product_detail.php @@ -134,11 +134,11 @@ public function _initData() // ToDo: This is potentially unsafe because $_POST elements are not sanitized. $data = $this->input->post->getArray(); - $data['product_desc'] = JFilterInput::getInstance(null, null, 1, 1)->clean( + $data['product_desc'] = JFilterInput::getInstance([], [], 1, 1)->clean( $this->input->get('product_desc', '', 'RAW'), 'html' ); - $data['product_s_desc'] = JFilterInput::getInstance(null, null, 1, 1)->clean( + $data['product_s_desc'] = JFilterInput::getInstance([], [], 1, 1)->clean( $this->input->get('product_s_desc', '', 'RAW'), 'html' ); diff --git a/component/admin/models/producttags.php b/component/admin/models/producttags.php index 501c9211eaa..635ffcd9f1c 100644 --- a/component/admin/models/producttags.php +++ b/component/admin/models/producttags.php @@ -87,7 +87,7 @@ public function getPagination() { if (empty($this->_pagination)) { jimport('joomla.html.pagination'); - $this->_pagination = new JPagination( + $this->_pagination = new \RPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') diff --git a/component/admin/models/quotation.php b/component/admin/models/quotation.php index fc3da61575e..212b49a6c64 100644 --- a/component/admin/models/quotation.php +++ b/component/admin/models/quotation.php @@ -162,14 +162,6 @@ public function getItemsCsv() $items = $this->_getList($query); - // Check for a database error. - if (/** @scrutinizer ignore-deprecated */ $this->_db->getErrorNum()) { - /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); - - return false; - } - if ($items) { foreach ($items as $key => $item) { $items[$key]->quotation_status = RedshopHelperQuotation::getQuotationStatusName( diff --git a/component/admin/models/sample_request.php b/component/admin/models/sample_request.php index b908c59f1c2..0881a5b140e 100644 --- a/component/admin/models/sample_request.php +++ b/component/admin/models/sample_request.php @@ -84,7 +84,7 @@ public function getPagination() { if (empty($this->_pagination)) { jimport('joomla.html.pagination'); - $this->_pagination = new JPagination( + $this->_pagination = new \RPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') diff --git a/component/admin/models/shipping_rate.php b/component/admin/models/shipping_rate.php index 75c99002392..eafb0751e29 100644 --- a/component/admin/models/shipping_rate.php +++ b/component/admin/models/shipping_rate.php @@ -108,7 +108,7 @@ public function getPagination() { if (empty($this->_pagination)) { jimport('joomla.html.pagination'); - $this->_pagination = new JPagination( + $this->_pagination = new \RPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') ); diff --git a/component/admin/models/stockimage.php b/component/admin/models/stockimage.php index 59d0bba356f..7d85669c304 100644 --- a/component/admin/models/stockimage.php +++ b/component/admin/models/stockimage.php @@ -90,7 +90,7 @@ public function getPagination() { if (empty($this->_pagination)) { jimport('joomla.html.pagination'); - $this->_pagination = new JPagination( + $this->_pagination = new \RPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') diff --git a/component/admin/models/user_detail.php b/component/admin/models/user_detail.php index 777d698d6ba..2a1b483948a 100644 --- a/component/admin/models/user_detail.php +++ b/component/admin/models/user_detail.php @@ -388,7 +388,7 @@ public function getPagination() { if (empty($this->_pagination)) { jimport('joomla.html.pagination'); - $this->_pagination = new JPagination( + $this->_pagination = new \RPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') diff --git a/component/admin/models/xmlexport.php b/component/admin/models/xmlexport.php index 865cbd2f170..543ba2aa4a9 100644 --- a/component/admin/models/xmlexport.php +++ b/component/admin/models/xmlexport.php @@ -84,7 +84,7 @@ public function getPagination() { if (empty($this->_pagination)) { jimport('joomla.html.pagination'); - $this->_pagination = new JPagination( + $this->_pagination = new \RPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') diff --git a/component/admin/models/xmlimport.php b/component/admin/models/xmlimport.php index b1dca32ea64..214f925b454 100644 --- a/component/admin/models/xmlimport.php +++ b/component/admin/models/xmlimport.php @@ -84,7 +84,7 @@ public function getPagination() { if (empty($this->_pagination)) { jimport('joomla.html.pagination'); - $this->_pagination = new JPagination( + $this->_pagination = new \RPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') diff --git a/component/admin/sql/install/mysql/data.sql b/component/admin/sql/install/mysql/data.sql index db7416f1ab3..18a21dd1367 100644 --- a/component/admin/sql/install/mysql/data.sql +++ b/component/admin/sql/install/mysql/data.sql @@ -958,11 +958,8 @@ INSERT IGNORE INTO `#__redshop_shipping_rate` (`shipping_rate_id`, `shipping_rat INSERT IGNORE INTO `#__redshop_shipping_boxes` (`shipping_box_id`, `shipping_box_name`, `shipping_box_length`, `shipping_box_width`, `shipping_box_height`, `shipping_box_priority`, `published`) VALUES (1, 'Box1', 1.00, 1.00, 1.00, 1, 1); -LOCK TABLES `#__redshop_category` WRITE; -ALTER TABLE `#__redshop_category` DISABLE KEYS; -INSERT INTO `#__redshop_category` VALUES (NULL, 'ROOT', '', '', 0, '', 0, '', '', '', '', '', '', '', '', '', 1, '0000-00-00 00:00:00', 0, '', '', 0, 'append', 'root', '', 0, 0, 0, 0, 1, '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', ''); -ALTER TABLE `#__redshop_category` ENABLE KEYS; -UNLOCK TABLES; +INSERT INTO `#__redshop_category` (`name`, `short_description`, `description`, `template`, `more_template`, `products_per_page`, `category_thumb_image`, `category_full_image`, `metakey`, `metadesc`, `metalanguage_setting`, `metarobot_info`, `pagetitle`, `pageheading`, `sef_url`, `published`, `category_pdate`, `ordering`, `canonical_url`, `category_back_full_image`, `compare_template_id`, `append_to_global_seo`, `alias`, `path`, `asset_id`, `parent_id`, `level`, `lft`, `rgt`, `checked_out`, `checked_out_time`, `created_date`, `created_by`, `modified_by`, `modified_date`, `publish_up`, `publish_down`, `product_filter_params`) +VALUES ('ROOT', '', '', 0, '', 0, '', '', '', '', '', '', '', '', '', 1, '0000-00-00 00:00:00', 0, '', '', 0, 'append', 'root', '', 0, 0, 0, 0, 1, NULL, '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, NULL, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', ''); INSERT IGNORE INTO `#__content_types` (`type_title`, `type_alias`, `table`, `rules`, `field_mappings`, `router`, `content_history_options`) diff --git a/component/admin/sql/install/mysql/install.sql b/component/admin/sql/install/mysql/install.sql index 4d16d080ad4..766ba6b0501 100644 --- a/component/admin/sql/install/mysql/install.sql +++ b/component/admin/sql/install/mysql/install.sql @@ -128,8 +128,8 @@ CREATE TABLE IF NOT EXISTS `#__redshop_category` ( `template` INT(11) NOT NULL, `more_template` VARCHAR(255) NOT NULL, `products_per_page` INT(11) NOT NULL, - `category_thumb_image` VARCHAR(250) NOT NULL, - `category_full_image` VARCHAR(250) NOT NULL, + `category_thumb_image` VARCHAR(250) NULL, + `category_full_image` VARCHAR(250) NULL, `metakey` VARCHAR(250) NOT NULL, `metadesc` LONGTEXT NOT NULL, `metalanguage_setting` TEXT NOT NULL, @@ -139,13 +139,13 @@ CREATE TABLE IF NOT EXISTS `#__redshop_category` ( `sef_url` TEXT NOT NULL, `published` TINYINT(4) NOT NULL, `category_pdate` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - `ordering` INT(11) NOT NULL, + `ordering` INT(11) NOT NULL DEFAULT '0', `canonical_url` TEXT NOT NULL, - `category_back_full_image` VARCHAR(250) NOT NULL, + `category_back_full_image` VARCHAR(250) NULL, `compare_template_id` VARCHAR(255) NOT NULL, `append_to_global_seo` ENUM('append', 'prepend', 'replace') NOT NULL DEFAULT 'append', `alias` VARCHAR(255) NOT NULL, - `path` VARCHAR(255) NOT NULL, + `path` VARCHAR(255) NULL, `asset_id` INT(11) UNSIGNED NULL COMMENT 'FK to the #__assets table.', `parent_id` INT(11) NULL DEFAULT 0, `level` INT(11) UNSIGNED NOT NULL DEFAULT 0, @@ -159,7 +159,7 @@ CREATE TABLE IF NOT EXISTS `#__redshop_category` ( `modified_date` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, `publish_up` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, `publish_down` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - `product_filter_params` MEDIUMTEXT NOT NULL DEFAULT '', + `product_filter_params` MEDIUMTEXT NOT NULL, PRIMARY KEY (`id`), INDEX `#__rs_idx_category_published` (`published` ASC), INDEX `#__rs_idx_left_right` (`lft` ASC, `rgt` ASC), @@ -712,21 +712,21 @@ DROP TABLE IF EXISTS `#__redshop_manufacturer` ; CREATE TABLE IF NOT EXISTS `#__redshop_manufacturer` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `name` VARCHAR(250) NOT NULL DEFAULT '', - `description` TEXT NOT NULL DEFAULT '', + `description` TEXT NOT NULL, `email` VARCHAR(250) NOT NULL DEFAULT '', `product_per_page` INT(11) NOT NULL DEFAULT 0, `template_id` INT(11) NOT NULL, - `metakey` TEXT NOT NULL DEFAULT '', - `metadesc` TEXT NOT NULL DEFAULT '', - `metalanguage_setting` TEXT NOT NULL DEFAULT '', - `metarobot_info` TEXT NOT NULL DEFAULT '', - `pagetitle` TEXT NOT NULL DEFAULT '', - `pageheading` TEXT NOT NULL DEFAULT '', - `sef_url` TEXT NOT NULL DEFAULT '', + `metakey` TEXT NOT NULL, + `metadesc` TEXT NOT NULL, + `metalanguage_setting` TEXT NOT NULL, + `metarobot_info` TEXT NOT NULL, + `pagetitle` TEXT NOT NULL, + `pageheading` TEXT NOT NULL, + `sef_url` TEXT NOT NULL, `published` TINYINT(4) NOT NULL DEFAULT 1, `ordering` INT(11) NOT NULL DEFAULT 0, `manufacturer_url` VARCHAR(255) NOT NULL DEFAULT '', - `excluding_category_list` TEXT NOT NULL DEFAULT '', + `excluding_category_list` TEXT NOT NULL, `checked_out` INT(11) NULL DEFAULT NULL, `checked_out_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, `created_by` INT(11) NULL DEFAULT NULL, @@ -748,9 +748,9 @@ DROP TABLE IF EXISTS `#__redshop_mass_discount` ; CREATE TABLE IF NOT EXISTS `#__redshop_mass_discount` ( `id` INT(11) NOT NULL AUTO_INCREMENT, - `discount_product` LONGTEXT NOT NULL DEFAULT '', - `category_id` LONGTEXT NOT NULL DEFAULT '', - `manufacturer_id` LONGTEXT NOT NULL DEFAULT '', + `discount_product` LONGTEXT NOT NULL, + `category_id` LONGTEXT NOT NULL, + `manufacturer_id` LONGTEXT NOT NULL, `type` TINYINT(4) NOT NULL, `amount` DOUBLE(10,2) NOT NULL, `start_date` INT(11) NOT NULL, @@ -2142,7 +2142,7 @@ DROP TABLE IF EXISTS `#__redshop_supplier` ; CREATE TABLE IF NOT EXISTS `#__redshop_supplier` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `name` VARCHAR(255) NOT NULL DEFAULT '', - `description` TEXT NOT NULL DEFAULT '', + `description` TEXT NOT NULL, `email` VARCHAR(255) NOT NULL DEFAULT '', `published` TINYINT(4) NOT NULL DEFAULT 0, `checked_out` INT(11) NULL DEFAULT NULL, @@ -2246,7 +2246,7 @@ CREATE TABLE IF NOT EXISTS `#__redshop_textlibrary` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `name` VARCHAR(255) NOT NULL DEFAULT '', `desc` VARCHAR(255) NOT NULL DEFAULT '', - `content` TEXT NOT NULL DEFAULT '', + `content` TEXT NOT NULL, `section` VARCHAR(255) NOT NULL, `published` TINYINT(4) NOT NULL DEFAULT 1, `checked_out` INT(11) NULL DEFAULT NULL, diff --git a/component/admin/sql/updates/mysql/2.0.0.6.sql b/component/admin/sql/updates/mysql/2.0.0.6.sql index bf641b58ba4..6e472c4c6fa 100644 --- a/component/admin/sql/updates/mysql/2.0.0.6.sql +++ b/component/admin/sql/updates/mysql/2.0.0.6.sql @@ -39,7 +39,7 @@ CREATE TABLE IF NOT EXISTS `#__redshop_wishlist_product_item` ( CALL redSHOP_Column_Update('#__redshop_supplier', 'supplier_id', 'id', "INT(11) NOT NULL AUTO_INCREMENT"); CALL redSHOP_Column_Update('#__redshop_supplier', 'supplier_name', 'name', "VARCHAR(255) NOT NULL DEFAULT ''"); -CALL redSHOP_Column_Update('#__redshop_supplier', 'supplier_desc', 'description', "TEXT NOT NULL DEFAULT ''"); +CALL redSHOP_Column_Update('#__redshop_supplier', 'supplier_desc', 'description', "TEXT NOT NULL"); CALL redSHOP_Column_Update('#__redshop_supplier', 'supplier_email', 'email', "VARCHAR(255) NOT NULL DEFAULT ''"); CALL redSHOP_Column_Update('#__redshop_supplier', 'published', 'published', "TINYINT(4) NOT NULL DEFAULT 0"); CALL redSHOP_Column_Update('#__redshop_supplier', 'checked_out', 'checked_out', "INT(11) NULL DEFAULT NULL AFTER `published`"); diff --git a/component/admin/sql/updates/mysql/2.0.12.sql b/component/admin/sql/updates/mysql/2.0.12.sql index 216c233028f..dcf3067a58a 100644 --- a/component/admin/sql/updates/mysql/2.0.12.sql +++ b/component/admin/sql/updates/mysql/2.0.12.sql @@ -9,7 +9,7 @@ CALL redSHOP_Index_Remove('#__redshop_textlibrary', 'idx_published'); CALL redSHOP_Column_Update('#__redshop_textlibrary', 'textlibrary_id', 'id', 'INT(11) NOT NULL AUTO_INCREMENT'); CALL redSHOP_Column_Update('#__redshop_textlibrary', 'text_name', 'name', "VARCHAR(255) NOT NULL DEFAULT ''"); CALL redSHOP_Column_Update('#__redshop_textlibrary', 'text_desc', 'desc', "VARCHAR(255) NOT NULL DEFAULT ''"); -CALL redSHOP_Column_Update('#__redshop_textlibrary', 'text_field', 'content', "TEXT NOT NULL DEFAULT ''"); +CALL redSHOP_Column_Update('#__redshop_textlibrary', 'text_field', 'content', "TEXT NOT NULL"); CALL redSHOP_Column_Update('#__redshop_textlibrary', 'published', 'published', "TINYINT(4) NOT NULL DEFAULT 1"); CALL redSHOP_Column_Update('#__redshop_textlibrary', 'checked_out', 'checked_out', "INT(11) NULL DEFAULT NULL"); CALL redSHOP_Column_Update('#__redshop_textlibrary', 'checked_out_time', 'checked_out_time', "DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'"); diff --git a/component/admin/sql/updates/mysql/2.0.15.sql b/component/admin/sql/updates/mysql/2.0.15.sql index 988bda93df1..8fbd3fb2331 100644 --- a/component/admin/sql/updates/mysql/2.0.15.sql +++ b/component/admin/sql/updates/mysql/2.0.15.sql @@ -7,19 +7,19 @@ CALL redSHOP_Index_Remove('#__redshop_manufacturer', 'idx_published'); CALL redSHOP_Column_Update('#__redshop_manufacturer', 'manufacturer_id', 'id', 'INT(11) NOT NULL AUTO_INCREMENT'); CALL redSHOP_Column_Update('#__redshop_manufacturer', 'manufacturer_name', 'name', "VARCHAR(250) NOT NULL DEFAULT ''"); -CALL redSHOP_Column_Update('#__redshop_manufacturer', 'manufacturer_desc', 'description', "TEXT NOT NULL DEFAULT ''"); +CALL redSHOP_Column_Update('#__redshop_manufacturer', 'manufacturer_desc', 'description', "TEXT NOT NULL"); CALL redSHOP_Column_Update('#__redshop_manufacturer', 'manufacturer_email', 'email', "VARCHAR(250) NOT NULL DEFAULT ''"); CALL redSHOP_Column_Update('#__redshop_manufacturer', 'product_per_page', 'product_per_page', "INT(11) NOT NULL DEFAULT 0"); -CALL redSHOP_Column_Update('#__redshop_manufacturer', 'metakey', 'metakey', "TEXT NOT NULL DEFAULT ''"); -CALL redSHOP_Column_Update('#__redshop_manufacturer', 'metadesc', 'metadesc', "TEXT NOT NULL DEFAULT ''"); -CALL redSHOP_Column_Update('#__redshop_manufacturer', 'metalanguage_setting', 'metalanguage_setting', "TEXT NOT NULL DEFAULT ''"); -CALL redSHOP_Column_Update('#__redshop_manufacturer', 'metarobot_info', 'metarobot_info', "TEXT NOT NULL DEFAULT ''"); -CALL redSHOP_Column_Update('#__redshop_manufacturer', 'pagetitle', 'pagetitle', "TEXT NOT NULL DEFAULT ''"); -CALL redSHOP_Column_Update('#__redshop_manufacturer', 'pageheading', 'pageheading', "TEXT NOT NULL DEFAULT ''"); -CALL redSHOP_Column_Update('#__redshop_manufacturer', 'sef_url', 'sef_url', "TEXT NOT NULL DEFAULT ''"); +CALL redSHOP_Column_Update('#__redshop_manufacturer', 'metakey', 'metakey', "TEXT NOT NULL"); +CALL redSHOP_Column_Update('#__redshop_manufacturer', 'metadesc', 'metadesc', "TEXT NOT NULL"); +CALL redSHOP_Column_Update('#__redshop_manufacturer', 'metalanguage_setting', 'metalanguage_setting', "TEXT NOT NULL"); +CALL redSHOP_Column_Update('#__redshop_manufacturer', 'metarobot_info', 'metarobot_info', "TEXT NOT NULL"); +CALL redSHOP_Column_Update('#__redshop_manufacturer', 'pagetitle', 'pagetitle', "TEXT NOT NULL"); +CALL redSHOP_Column_Update('#__redshop_manufacturer', 'pageheading', 'pageheading', "TEXT NOT NULL"); +CALL redSHOP_Column_Update('#__redshop_manufacturer', 'sef_url', 'sef_url', "TEXT NOT NULL"); CALL redSHOP_Column_Update('#__redshop_manufacturer', 'ordering', 'ordering', "INT(11) NOT NULL DEFAULT 0"); CALL redSHOP_Column_Update('#__redshop_manufacturer', 'manufacturer_url', 'manufacturer_url', "VARCHAR(255) NOT NULL DEFAULT ''"); -CALL redSHOP_Column_Update('#__redshop_manufacturer', 'excluding_category_list', 'excluding_category_list', "TEXT NOT NULL DEFAULT ''"); +CALL redSHOP_Column_Update('#__redshop_manufacturer', 'excluding_category_list', 'excluding_category_list', "TEXT NOT NULL"); CALL redSHOP_Column_Update('#__redshop_manufacturer', 'published', 'published', "TINYINT(4) NOT NULL DEFAULT 1"); CALL redSHOP_Column_Update('#__redshop_manufacturer', 'checked_out', 'checked_out', "INT(11) NULL DEFAULT NULL"); CALL redSHOP_Column_Update('#__redshop_manufacturer', 'checked_out_time', 'checked_out_time', "DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'"); diff --git a/component/admin/sql/updates/mysql/2.0.6.sql b/component/admin/sql/updates/mysql/2.0.6.sql index f38b39a23dd..da1e5bae123 100644 --- a/component/admin/sql/updates/mysql/2.0.6.sql +++ b/component/admin/sql/updates/mysql/2.0.6.sql @@ -4,8 +4,8 @@ DROP TABLE IF EXISTS `#__redshop_accessmanager`; CALL redSHOP_Column_Update('#__redshop_category', 'category_id', 'id', "INT(11) NOT NULL AUTO_INCREMENT"); CALL redSHOP_Column_Update('#__redshop_category', 'category_name', 'name', "VARCHAR(255) NOT NULL DEFAULT ''"); -CALL redSHOP_Column_Update('#__redshop_category', 'category_short_description', 'short_description', "TEXT NOT NULL DEFAULT ''"); -CALL redSHOP_Column_Update('#__redshop_category', 'category_description', 'description', "TEXT NOT NULL DEFAULT ''"); +CALL redSHOP_Column_Update('#__redshop_category', 'category_short_description', 'short_description', "TEXT NOT NULL"); +CALL redSHOP_Column_Update('#__redshop_category', 'category_description', 'description', "TEXT NOT NULL"); CALL redSHOP_Column_Update('#__redshop_category', 'published', 'published', "TINYINT(4) NOT NULL DEFAULT 0"); CALL redSHOP_Column_Update('#__redshop_category', 'category_template', 'template', "INT(11) NOT NULL DEFAULT 0"); CALL redSHOP_Column_Update('#__redshop_category', 'category_more_template', 'more_template', "VARCHAR(255) NOT NULL DEFAULT ''"); diff --git a/component/admin/sql/updates/mysql/2.1.2.sql b/component/admin/sql/updates/mysql/2.1.2.sql index 3bcdeaae177..941831c07d2 100644 --- a/component/admin/sql/updates/mysql/2.1.2.sql +++ b/component/admin/sql/updates/mysql/2.1.2.sql @@ -3,6 +3,6 @@ SET FOREIGN_KEY_CHECKS = 0; -- ----------------------------------------------------- -- Table `#__redshop_category` -- ----------------------------------------------------- -CALL redSHOP_Column_Update('#__redshop_category', 'product_filter_params', 'product_filter_params', "MEDIUMTEXT NOT NULL DEFAULT '' AFTER `publish_down`"); +CALL redSHOP_Column_Update('#__redshop_category', 'product_filter_params', 'product_filter_params', "MEDIUMTEXT NOT NULL AFTER `publish_down`"); SET FOREIGN_KEY_CHECKS = 1; \ No newline at end of file diff --git a/component/admin/views/accountgroup/view.html.php b/component/admin/views/accountgroup/view.html.php index 4bbf5cb71c8..bf6d420c32d 100644 --- a/component/admin/views/accountgroup/view.html.php +++ b/component/admin/views/accountgroup/view.html.php @@ -29,7 +29,7 @@ public function display($tpl = null) JToolBarHelper::publishList(); JToolBarHelper::unpublishList(); - $uri = JFactory::getURI(); + $uri = \Joomla\CMS\Uri\Uri::getInstance(); $filter_order = $app->getUserStateFromRequest( $context . 'filter_order', diff --git a/component/admin/views/addorder_detail/view.html.php b/component/admin/views/addorder_detail/view.html.php index 3bf3c84c26c..9861b0a6e74 100644 --- a/component/admin/views/addorder_detail/view.html.php +++ b/component/admin/views/addorder_detail/view.html.php @@ -47,15 +47,15 @@ public function display($tpl = null) $document = JFactory::getDocument(); $document->setTitle(JText::_('COM_REDSHOP_ORDER')); /** @scrutinizer ignore-deprecated */ - JHtml::script('com_redshop/json.min.js', false, true); + RHtml::script('com_redshop/json.min.js', false, true); /** @scrutinizer ignore-deprecated */ - JHtml::script('com_redshop/redshop.validation.min.js', false, true); + RHtml::script('com_redshop/redshop.validation.min.js', false, true); /** @scrutinizer ignore-deprecated */ - JHtml::script('com_redshop/redshop.order.min.js', false, true); + RHtml::script('com_redshop/redshop.order.min.js', false, true); /** @scrutinizer ignore-deprecated */ - JHtml::script('com_redshop/redshop.admin.common.min.js', false, true); + RHtml::script('com_redshop/redshop.admin.common.min.js', false, true); /** @scrutinizer ignore-deprecated */ - JHtml::script('com_redshop/ajaxupload.min.js', false, true); + RHtml::script('com_redshop/ajaxupload.min.js', false, true); $uri = JUri::getInstance(); $lists = array(); diff --git a/component/admin/views/addquotation_detail/view.html.php b/component/admin/views/addquotation_detail/view.html.php index 8df07830c50..444e0107a82 100644 --- a/component/admin/views/addquotation_detail/view.html.php +++ b/component/admin/views/addquotation_detail/view.html.php @@ -33,15 +33,15 @@ public function display($tpl = null) $document->setTitle(JText::_('COM_REDSHOP_QUOTATION_MANAGEMENT')); /** @scrutinizer ignore-deprecated */ - JHtml::script('com_redshop/json.min.js', false, true); + RHtml::script('com_redshop/json.min.js', false, true); /** @scrutinizer ignore-deprecated */ - JHtml::script('com_redshop/redshop.validation.min.js', false, true); + RHtml::script('com_redshop/redshop.validation.min.js', false, true); /** @scrutinizer ignore-deprecated */ - JHtml::script('com_redshop/redshop.order.min.js', false, true); + RHtml::script('com_redshop/redshop.order.min.js', false, true); /** @scrutinizer ignore-deprecated */ - JHtml::script('com_redshop/redshop.admin.common.min.js', false, true); + RHtml::script('com_redshop/redshop.admin.common.min.js', false, true); /** @scrutinizer ignore-deprecated */ - JHtml::script('com_redshop/ajaxupload.min.js', false, true); + RHtml::script('com_redshop/ajaxupload.min.js', false, true); $session = JFactory::getSession(); $uri = JUri::getInstance(); diff --git a/component/admin/views/alert/view.html.php b/component/admin/views/alert/view.html.php index 4b138f7041c..a1e102440de 100644 --- a/component/admin/views/alert/view.html.php +++ b/component/admin/views/alert/view.html.php @@ -43,7 +43,7 @@ public function display($tpl = null) true ); - $uri = JFactory::getURI(); + $uri = \Joomla\CMS\Uri\Uri::getInstance(); $this->state = $this->get('State'); $optiontype = array(); diff --git a/component/admin/views/attribute_set/view.html.php b/component/admin/views/attribute_set/view.html.php index 389c71c6577..a1581304c0c 100644 --- a/component/admin/views/attribute_set/view.html.php +++ b/component/admin/views/attribute_set/view.html.php @@ -30,7 +30,7 @@ public function display($tpl = null) JToolBarHelper::publishList(); JToolBarHelper::unpublishList(); - $uri = JFactory::getURI(); + $uri = \Joomla\CMS\Uri\Uri::getInstance(); $filter_order = $app->getUserStateFromRequest( $context . 'filter_order', diff --git a/component/admin/views/attribute_set_detail/view.html.php b/component/admin/views/attribute_set_detail/view.html.php index 5669ee9978c..1b07d4520d9 100644 --- a/component/admin/views/attribute_set_detail/view.html.php +++ b/component/admin/views/attribute_set_detail/view.html.php @@ -38,15 +38,15 @@ public function display($tpl = null) if (version_compare(JVERSION, '3.0', '<')) { /** @scrutinizer ignore-deprecated */ - JHtml::stylesheet('com_redshop/redshop.update.min.css', array(), true); + RHtml::stylesheet('com_redshop/redshop.update.min.css', array(), true); } /** @scrutinizer ignore-deprecated */ - JHtml::script('com_redshop/redshop.attribute-manipulation.min.js', false, true); + RHtml::script('com_redshop/redshop.attribute-manipulation.min.js', false, true); /** @scrutinizer ignore-deprecated */ - JHtml::script('com_redshop/redshop.fields.min.js', false, true); + RHtml::script('com_redshop/redshop.fields.min.js', false, true); /** @scrutinizer ignore-deprecated */ - JHtml::script('com_redshop/redshop.validation.min.js', false, true); + RHtml::script('com_redshop/redshop.validation.min.js', false, true); $uri = JUri::getInstance(); diff --git a/component/admin/views/attributeprices/view.html.php b/component/admin/views/attributeprices/view.html.php index 34721bdba2c..03e03479481 100644 --- a/component/admin/views/attributeprices/view.html.php +++ b/component/admin/views/attributeprices/view.html.php @@ -30,14 +30,14 @@ public function display($tpl = null) JToolbarHelper::addNew(); JToolbarHelper::EditList(); JToolBarHelper::deleteList(); - $uri = JFactory::getURI(); + $uri = \Joomla\CMS\Uri\Uri::getInstance(); $limitstart = $app->getUserStateFromRequest($context . 'limitstart', 'limitstart', '0'); $limit = $app->getUserStateFromRequest($context . 'limit', 'limit', '10'); $total = $this->get('Total'); $data = $this->get('Data'); - $pagination = new JPagination($total, $limitstart, $limit); + $pagination = new \RPagination($total, $limitstart, $limit); $this->user = JFactory::getUser(); $this->data = $data; diff --git a/component/admin/views/attributeprices_detail/view.html.php b/component/admin/views/attributeprices_detail/view.html.php index 775c8a471f7..c0e2fc46e00 100644 --- a/component/admin/views/attributeprices_detail/view.html.php +++ b/component/admin/views/attributeprices_detail/view.html.php @@ -25,7 +25,7 @@ public function display($tpl = null) $this->detail = $this->get('data'); $model = $this->getModel('attributeprices_detail'); $this->property = $model->getPropertyName(); - $this->request_url = JFactory::getURI()->toString(); + $this->request_url = \Joomla\CMS\Uri\Uri::getInstance()->toString(); $this->lists['shopper_group_name'] = RedshopHelperShopper_Group::listAll( "shopper_group_id", diff --git a/component/admin/views/catalog_request/view.html.php b/component/admin/views/catalog_request/view.html.php index 2bdaa7991d2..e39692b008a 100644 --- a/component/admin/views/catalog_request/view.html.php +++ b/component/admin/views/catalog_request/view.html.php @@ -26,7 +26,7 @@ public function display($tpl = null) JToolBarHelper::publishList(); JToolBarHelper::unpublishList(); - $uri = JFactory::getURI(); + $uri = \Joomla\CMS\Uri\Uri::getInstance(); $filter_order = $app->getUserStateFromRequest($context . 'filter_order', 'filter_order', 'catalog_user_id'); $filter_order_Dir = $app->getUserStateFromRequest($context . 'filter_order_Dir', 'filter_order_Dir', ''); diff --git a/component/admin/views/catalogs/tmpl/default.php b/component/admin/views/catalogs/tmpl/default.php index 436659d236e..2090e178653 100644 --- a/component/admin/views/catalogs/tmpl/default.php +++ b/component/admin/views/catalogs/tmpl/default.php @@ -9,6 +9,6 @@ */ defined('_JEXEC') or die; -JHtml::_('behavior.modal', '.joom-box'); +JHtml::_('rbootstrap.modal', '.joom-box'); echo RedshopLayoutHelper::render('view.list', array('data' => $this)); diff --git a/component/admin/views/category/tmpl/edit.php b/component/admin/views/category/tmpl/edit.php index ed57c54dc61..a4b3e2f4db1 100644 --- a/component/admin/views/category/tmpl/edit.php +++ b/component/admin/views/category/tmpl/edit.php @@ -9,7 +9,7 @@ */ defined('_JEXEC') or die; -JHtml::_('behavior.modal'); +JHtml::_('rbootstrap.modal'); JHtml::_('behavior.formvalidator'); ?> diff --git a/component/admin/views/addorder_detail/tmpl/default.php b/component/admin/views/addorder_detail/tmpl/default.php index 250c92588b9..37ca40a1078 100644 --- a/component/admin/views/addorder_detail/tmpl/default.php +++ b/component/admin/views/addorder_detail/tmpl/default.php @@ -156,7 +156,7 @@ function addNewproductRow(tblid) { validateUserDetail(); return false; } - submitform(pressbutton); + Joomla.submitform(pressbutton); } function validateUserDetail() { @@ -279,7 +279,7 @@ function validateUserDetail() { if (validateExtrafield(form) == false) { return false; } - submitform('guestuser'); + Joomla.submitform('guestuser'); } diff --git a/component/admin/views/addquotation_detail/tmpl/default.php b/component/admin/views/addquotation_detail/tmpl/default.php index f8e5db7a005..643e51fe6a6 100644 --- a/component/admin/views/addquotation_detail/tmpl/default.php +++ b/component/admin/views/addquotation_detail/tmpl/default.php @@ -77,7 +77,7 @@ function addNewproductRow(tblid) { var form = document.adminForm; if (pressbutton == 'cancel') { - submitform(pressbutton); + Joomla.submitform(pressbutton); return; } @@ -101,7 +101,7 @@ function addNewproductRow(tblid) { return false; } } - submitform(pressbutton); + Joomla.submitform(pressbutton); } function validateUserDetail() { diff --git a/component/admin/views/attribute_set_detail/tmpl/default.php b/component/admin/views/attribute_set_detail/tmpl/default.php index 8ba9bff1c9e..0c49c5a1b4d 100644 --- a/component/admin/views/attribute_set_detail/tmpl/default.php +++ b/component/admin/views/attribute_set_detail/tmpl/default.php @@ -16,7 +16,7 @@ var form = document.adminForm; if (pressbutton == 'cancel') { - submitform(pressbutton); + Joomla.submitform(pressbutton); return; } @@ -27,7 +27,7 @@ ?>"); } else { - submitform(pressbutton); + Joomla.submitform(pressbutton); } } diff --git a/component/admin/views/attributeprices_detail/tmpl/default.php b/component/admin/views/attributeprices_detail/tmpl/default.php index 46c4f654f25..28e6007bfae 100644 --- a/component/admin/views/attributeprices_detail/tmpl/default.php +++ b/component/admin/views/attributeprices_detail/tmpl/default.php @@ -26,7 +26,7 @@ Joomla.submitbutton = function (pressbutton) { var form = document.adminForm; if (pressbutton == 'cancel') { - submitform(pressbutton); + Joomla.submitform(pressbutton); return; } if (form.product_price.value == "" || isNaN(form.product_price.value) || form.product_price.value == 0) { @@ -48,7 +48,7 @@ alert(""); form.discount_start_date.focus(); } else { - submitform(pressbutton); + Joomla.submitform(pressbutton); } } diff --git a/component/admin/views/field/tmpl/edit.php b/component/admin/views/field/tmpl/edit.php index b431a594565..6879676c99f 100755 --- a/component/admin/views/field/tmpl/edit.php +++ b/component/admin/views/field/tmpl/edit.php @@ -74,7 +74,7 @@ document.getElementById("jform_section").disabled = false; - submitform(task); + Joomla.submitform(task); } }; diff --git a/component/admin/views/newsletter/tmpl/statistics.php b/component/admin/views/newsletter/tmpl/statistics.php index e6acc42d324..b7d57135d2f 100644 --- a/component/admin/views/newsletter/tmpl/statistics.php +++ b/component/admin/views/newsletter/tmpl/statistics.php @@ -62,7 +62,7 @@ function drawChart() { Joomla.submitbutton = function (pressbutton) { var form = document.adminForm; if (pressbutton == 'cancel') { - submitform(pressbutton); + Joomla.submitform(pressbutton); return; } } diff --git a/component/admin/views/prices_detail/tmpl/default.php b/component/admin/views/prices_detail/tmpl/default.php index cdff642516f..f90b059e206 100644 --- a/component/admin/views/prices_detail/tmpl/default.php +++ b/component/admin/views/prices_detail/tmpl/default.php @@ -15,7 +15,7 @@ Joomla.submitbutton = function (pressbutton) { var form = document.adminForm; if (pressbutton == "cancel") { - submitform(pressbutton); + Joomla.submitform(pressbutton); return; } if (parseFloat(form.price_quantity_start.value) > parseFloat(form.price_quantity_end.value)) { @@ -31,7 +31,7 @@ form.product_price.focus(); return; } - submitform(pressbutton); + Joomla.submitform(pressbutton); };
'; - - setUserState( - 'com_redshop.product_detail.selectedTabPosition', - 'general_data' - ) ?> - - $('#general_data').html(reloading_img); - window.location.reload(); - } - }; + //SqueezeBox.presets.onClose = function (e) { + // if (this.options.classWindow == 'additional-media-popup') { + // var reloading_img = '
'; + // + // setUserState( + // 'com_redshop.product_detail.selectedTabPosition', + // 'general_data' + // ) ?> + // + // $('#general_data').html(reloading_img); + // window.location.reload(); + // } + //}; }); })(jQuery); diff --git a/component/admin/views/product_detail/tmpl/property_images.php b/component/admin/views/product_detail/tmpl/property_images.php index c6a739ac982..53ecd07264c 100644 --- a/component/admin/views/product_detail/tmpl/property_images.php +++ b/component/admin/views/product_detail/tmpl/property_images.php @@ -35,7 +35,7 @@ submitbutton = function (pressbutton) { if (pressbutton == 'save') { - submitform('property_more_img'); + Joomla.submitform('property_more_img'); } } diff --git a/component/admin/views/producttags_detail/tmpl/default.php b/component/admin/views/producttags_detail/tmpl/default.php index 00966c1ab7a..3b09b79e980 100644 --- a/component/admin/views/producttags_detail/tmpl/default.php +++ b/component/admin/views/producttags_detail/tmpl/default.php @@ -15,14 +15,14 @@ Joomla.submitbutton = function (pressbutton) { var form = document.adminForm; if (pressbutton == 'cancel') { - submitform(pressbutton); + Joomla.submitform(pressbutton); return; } if (form.tags_name.value == "") { alert(""); } else { - submitform(pressbutton); + Joomla.submitform(pressbutton); } } diff --git a/component/admin/views/question/tmpl/edit.php b/component/admin/views/question/tmpl/edit.php index 916b8911a0f..fd4a0ce2a6f 100644 --- a/component/admin/views/question/tmpl/edit.php +++ b/component/admin/views/question/tmpl/edit.php @@ -16,7 +16,7 @@ if ((pressbutton != 'question.cancel') && (form.jform_product_id.value == 0)) { alert(""); } else { - submitform(pressbutton); + Joomla.submitform(pressbutton); } } diff --git a/component/admin/views/quotation_detail/tmpl/default.php b/component/admin/views/quotation_detail/tmpl/default.php index 4429c99f399..91d67eb4483 100644 --- a/component/admin/views/quotation_detail/tmpl/default.php +++ b/component/admin/views/quotation_detail/tmpl/default.php @@ -32,7 +32,7 @@ Joomla.submitbutton = submitbutton = function (pressbutton) { var form = document.adminForm; if (pressbutton == 'cancel') { - submitform(pressbutton); + Joomla.submitform(pressbutton); return; } if (pressbutton == 'add') { @@ -47,7 +47,7 @@ return false; } - submitform('newQuotationItem'); + Joomla.submitform('newQuotationItem'); return; } if ((pressbutton == 'save') || (pressbutton == 'send') || (pressbutton == 'aplly')) { @@ -66,7 +66,7 @@ } } } - submitform(pressbutton); + Joomla.submitform(pressbutton); } function validateProductQuantity() { diff --git a/component/admin/views/shipping_rate_detail/tmpl/default.php b/component/admin/views/shipping_rate_detail/tmpl/default.php index 208a31d1f2a..52283f17323 100644 --- a/component/admin/views/shipping_rate_detail/tmpl/default.php +++ b/component/admin/views/shipping_rate_detail/tmpl/default.php @@ -19,7 +19,7 @@ Joomla.submitbutton = function (pressbutton) { var form = document.adminForm; if (pressbutton == 'cancel') { - submitform(pressbutton); + Joomla.submitform(pressbutton); return; } @@ -27,7 +27,7 @@ if (form.shipping_rate_name.value === "") { alert(""); } else { - submitform(pressbutton); + Joomla.submitform(pressbutton); } if (form.shipping_rate_name.value === "") { @@ -37,7 +37,7 @@ } else if (parseInt(form.shipping_rate_zip_end.value) < parseInt(form.shipping_rate_zip_start.value)) { alert(""); } else { - submitform(pressbutton); + Joomla.submitform(pressbutton); } } diff --git a/component/admin/views/stockimage_detail/tmpl/default.php b/component/admin/views/stockimage_detail/tmpl/default.php index 7a7a318f30f..f5990e991e3 100644 --- a/component/admin/views/stockimage_detail/tmpl/default.php +++ b/component/admin/views/stockimage_detail/tmpl/default.php @@ -27,7 +27,7 @@ Joomla.submitbutton = function (pressbutton) { var form = document.adminForm; if (pressbutton == 'cancel') { - submitform(pressbutton); + Joomla.submitform(pressbutton); return; } @@ -40,7 +40,7 @@ } else if (isNaN(form.stock_quantity.value) || form.stock_quantity.value < 0) { alert(""); } else { - submitform(pressbutton); + Joomla.submitform(pressbutton); } } diff --git a/component/admin/views/stockroom/tmpl/importstock.php b/component/admin/views/stockroom/tmpl/importstock.php index 718c8a8d413..b257db4e4cf 100644 --- a/component/admin/views/stockroom/tmpl/importstock.php +++ b/component/admin/views/stockroom/tmpl/importstock.php @@ -14,7 +14,7 @@ var form = document.adminForm; if (pressbutton == 'cancel') { - submitform(pressbutton); + Joomla.submitform(pressbutton); return; } } diff --git a/component/admin/views/user_detail/tmpl/default.php b/component/admin/views/user_detail/tmpl/default.php index 385b6464374..69315e4d3f8 100644 --- a/component/admin/views/user_detail/tmpl/default.php +++ b/component/admin/views/user_detail/tmpl/default.php @@ -43,12 +43,12 @@ var form = document.adminForm; if (pressbutton == 'cancel') { - submitform(pressbutton); + Joomla.submitform(pressbutton); return; } if (pressbutton == 'order') { - submitform(pressbutton); + Joomla.submitform(pressbutton); return; } @@ -60,7 +60,7 @@ } else if (form.lastname.value == "") { alert(""); } else { - submitform(pressbutton); + Joomla.submitform(pressbutton); } if ((form.email.value) == "") { @@ -128,7 +128,7 @@ } } - submitform(pressbutton); + Joomla.submitform(pressbutton); } diff --git a/component/admin/views/xmlexport_detail/tmpl/default.php b/component/admin/views/xmlexport_detail/tmpl/default.php index db1a4528b0e..a8f446e0fa8 100644 --- a/component/admin/views/xmlexport_detail/tmpl/default.php +++ b/component/admin/views/xmlexport_detail/tmpl/default.php @@ -32,7 +32,7 @@ Joomla.submitbutton = function (pressbutton) { var form = document.adminForm; if (pressbutton == 'cancel') { - submitform(pressbutton); + Joomla.submitform(pressbutton); return; } if (form.display_filename.value == "") { @@ -42,7 +42,7 @@ } else if (form.section_type.value == "" || form.section_type.value == 0) { alert(""); } else { - submitform(pressbutton); + Joomla.submitform(pressbutton); } } diff --git a/component/admin/views/xmlexport_detail/tmpl/elementdetail.php b/component/admin/views/xmlexport_detail/tmpl/elementdetail.php index 350ed604114..dffa719d304 100644 --- a/component/admin/views/xmlexport_detail/tmpl/elementdetail.php +++ b/component/admin/views/xmlexport_detail/tmpl/elementdetail.php @@ -22,7 +22,7 @@ if (form.element_name.value == "") { alert(""); } else { - submitform(pressbutton); + Joomla.submitform(pressbutton); } } diff --git a/component/admin/views/xmlimport_detail/tmpl/default.php b/component/admin/views/xmlimport_detail/tmpl/default.php index 45c79983062..6018d3b389a 100644 --- a/component/admin/views/xmlimport_detail/tmpl/default.php +++ b/component/admin/views/xmlimport_detail/tmpl/default.php @@ -133,7 +133,7 @@ function getUniqueArray(a) { submitbutton = function (pressbutton) { var form = document.adminForm; if (pressbutton == 'cancel') { - submitform(pressbutton); + Joomla.submitform(pressbutton); return; } if (document.getElementsByName("xmlfiletag[]")) { @@ -277,7 +277,7 @@ function getUniqueArray(a) { } else if (form.cntxmlfiletag.value == 0) { alert(""); } else { - submitform(pressbutton); + Joomla.submitform(pressbutton); } } diff --git a/component/site/layouts/filter/restricted.php b/component/site/layouts/filter/restricted.php index c2805d03108..d05f52e4043 100644 --- a/component/site/layouts/filter/restricted.php +++ b/component/site/layouts/filter/restricted.php @@ -23,7 +23,7 @@ id, $formData['redform']['categories'])) : ?> - onchange="javascript:submitform(this)" + onchange="javascript:Joomla.submitform(this)" /> name; ?> @@ -54,7 +54,7 @@ id, $manufacturersValue)) : ?> - onchange="javascript:submitform(this)" + onchange="javascript:Joomla.submitform(this)" > name; ?> @@ -83,7 +83,7 @@ - onchange="javascript:submitform(this)" + onchange="javascript:Joomla.submitform(this)" /> diff --git a/component/site/models/ask_question.php b/component/site/models/ask_question.php index bf1a1c32824..e34d85a4001 100644 --- a/component/site/models/ask_question.php +++ b/component/site/models/ask_question.php @@ -95,13 +95,13 @@ public function store($data) $data['ordering'] = $this->maxOrdering(); if (!$row->bind($data)) { - $this->setError($this->_db->getErrorMsg()); + $this->setError($row->getError()); return false; } if (!$row->store()) { - $this->setError($this->_db->getErrorMsg()); + $this->setError($row->getError()); return false; } diff --git a/component/site/models/catalog.php b/component/site/models/catalog.php index 37b67e7e54a..6ea16e38849 100644 --- a/component/site/models/catalog.php +++ b/component/site/models/catalog.php @@ -47,14 +47,14 @@ public function catalogStore($data) if (!$row->bind($data)) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $row->getError()); return false; } if (!$row->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $row->getError()); return false; } @@ -77,14 +77,14 @@ public function catalogSampleStore($data) if (!$row->bind($data)) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $row->getError()); return false; } if (!$row->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $row->getError()); return false; } diff --git a/component/site/models/checkout.php b/component/site/models/checkout.php index 9b28ca1596e..32e6695a88f 100644 --- a/component/site/models/checkout.php +++ b/component/site/models/checkout.php @@ -424,7 +424,7 @@ public function orderPlace() if (!$row->bind($post)) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $row->getError()); return false; } @@ -489,7 +489,7 @@ public function orderPlace() if (!$row->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $row->getError()); // Start code to track duplicate order number checking $this->deleteOrdernumberTrack(); @@ -561,7 +561,7 @@ public function orderPlace() if (!$rowItem->bind($post)) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $rowItem->getError()); return false; } @@ -690,7 +690,7 @@ public function orderPlace() if (!$rowItem->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $rowItem->getError()); return false; } @@ -757,7 +757,7 @@ public function orderPlace() if ($attributeId > 0) { if (!$rowattitem->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $rowattitem->getError()); return false; } @@ -798,7 +798,7 @@ public function orderPlace() if ($propertyId > 0) { if (!$rowattitem->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $rowattitem->getError()); return false; } @@ -836,7 +836,7 @@ public function orderPlace() if (!$rowattitem->store()) { /** @scrutinizer ignore-deprecated */ $this->setError( - /** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg() + /** @scrutinizer ignore-deprecated */ $rowattitem->getError() ); return false; @@ -903,7 +903,7 @@ public function orderPlace() if ($accessoryId > 0) { if (!$rowaccitem->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $rowaccitem->getError()); return false; } @@ -933,7 +933,7 @@ public function orderPlace() if ($attributeId > 0) { if (!$rowattitem->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $rowattitem->getError()); return false; } @@ -978,7 +978,7 @@ public function orderPlace() if ($propertyId > 0) { if (!$rowattitem->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $rowattitem->getError()); return false; } @@ -1026,7 +1026,7 @@ public function orderPlace() if (!$rowattitem->store()) { /** @scrutinizer ignore-deprecated */ $this->setError( - /** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg() + /** @scrutinizer ignore-deprecated */ $rowattitem->getError() ); return false; @@ -1066,7 +1066,7 @@ public function orderPlace() if (!$subscribe->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $subscribe->getError()); return false; } @@ -1078,7 +1078,7 @@ public function orderPlace() if (!$rowpayment->bind($post)) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $rowpayment->getError()); return false; } @@ -1119,7 +1119,7 @@ public function orderPlace() if (!$rowpayment->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $rowpayment->getError()); return false; } @@ -1139,7 +1139,7 @@ public function orderPlace() if (!$orderuserrow->bind($userrow)) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $orderuserrow->getError()); return false; } @@ -1152,7 +1152,7 @@ public function orderPlace() if (!$orderuserrow->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $orderuserrow->getError()); return false; } @@ -1172,7 +1172,7 @@ public function orderPlace() if (!$orderuserrow->bind($userrow)) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $orderuserrow->getError()); return false; } @@ -1184,7 +1184,7 @@ public function orderPlace() if (!$orderuserrow->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $orderuserrow->getError()); return false; } @@ -1309,14 +1309,7 @@ public function deleteOrdernumberTrack() $db = JFactory::getDbo(); $query = 'TRUNCATE TABLE ' . $db->quoteName('#__redshop_ordernumber_track'); - if (!$db->setQuery($query)->execute()) { - $msg = /** @scrutinizer ignore-deprecated */ - $db->getErrorMsg(); - /** @scrutinizer ignore-deprecated */ - $this->setError($msg); - - return false; - } + $db->setQuery($query)->execute(); return true; } @@ -1350,7 +1343,7 @@ public function coupon($cart) if (!$rowcoupon->bind($cart)) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $rowcoupon->getError()); } if ($coupon['transaction_coupon_id']) { @@ -1367,7 +1360,7 @@ public function coupon($cart) if (!$rowcoupon->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $rowcoupon->getError()); return false; } @@ -1420,7 +1413,7 @@ public function voucher($cart, $order_id) if (!$table->bind($cart)) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $table->getError()); } if ($voucher['transaction_voucher_id']) { @@ -1439,7 +1432,7 @@ public function voucher($cart, $order_id) if (!$table->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $table->getError()); return false; } @@ -1914,15 +1907,7 @@ public function insertOrdernumberTrack() ->columns($db->quoteName('trackdatetime')) ->values('NOW()'); - if (!$db->setQuery($query)->execute()) { - $msg = /** @scrutinizer ignore-deprecated */ - $db->getErrorMsg(); - - /** @scrutinizer ignore-deprecated */ - $this->setError($msg); - - return false; - } + $db->setQuery($query)->execute(); return true; } diff --git a/component/site/models/product.php b/component/site/models/product.php index 967b1a97058..b714489f124 100644 --- a/component/site/models/product.php +++ b/component/site/models/product.php @@ -183,14 +183,14 @@ public function sendMailForReview($data) if (!$row->bind($data)) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $row->getError()); return false; } if (!$row->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $row->getError()); return false; } @@ -286,14 +286,14 @@ public function addProductTags($data) if (!$tags->bind($data)) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $tags->getError()); return false; } if (!$tags->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $tags->getError()); return false; } @@ -307,14 +307,14 @@ public function addtowishlist($data) if (!$row->bind($data)) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $row->getError()); return false; } if (!$row->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $row->getError()); return false; } @@ -536,14 +536,14 @@ public function addNotifystock($productId, $propertyId, $subPropertyId, $email_n if (!$row->bind($data)) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $row->getError()); return false; } if (!$row->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $row->getError()); return false; } diff --git a/component/site/models/product_rating.php b/component/site/models/product_rating.php index 363864836a3..7dc97459431 100644 --- a/component/site/models/product_rating.php +++ b/component/site/models/product_rating.php @@ -143,13 +143,13 @@ public function store($data) $row = $this->getTable('rating'); if (!$row->bind($data)) { - $this->setError($this->_db->getErrorMsg()); + $this->setError($row->getError()); return false; } if (!$row->store()) { - $this->setError($this->_db->getErrorMsg()); + $this->setError($row->getError()); return false; } diff --git a/component/site/models/quotation.php b/component/site/models/quotation.php index 94aa51ae2d0..6bf13b761fc 100644 --- a/component/site/models/quotation.php +++ b/component/site/models/quotation.php @@ -167,7 +167,7 @@ public function usercreate($data) if (!$row->bind($data)) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $row->getError()); return false; } @@ -197,7 +197,7 @@ public function usercreate($data) if (!$row->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $row->getError()); return false; } @@ -306,14 +306,14 @@ public function store($data, $post) if (!$row->bind($data)) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $row->getError()); return false; } if (!$row->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $row->getError()); return false; } @@ -368,14 +368,14 @@ public function store($data, $post) if (!$rowitem->bind($quotation_item[$i])) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $rowitem->getError()); return false; } if (!$rowitem->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $rowitem->getError()); return false; } @@ -417,7 +417,7 @@ public function store($data, $post) if ($attributeId > 0) { if (!$rowattitem->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $rowattitem->getError()); return false; } @@ -455,7 +455,7 @@ public function store($data, $post) if ($propertyId > 0) { if (!$rowattitem->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $rowattitem->getError()); return false; } @@ -489,7 +489,7 @@ public function store($data, $post) if (!$rowattitem->store()) { /** @scrutinizer ignore-deprecated */ $this->setError( - /** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg() + /** @scrutinizer ignore-deprecated */ $rowattitem->getError() ); return false; @@ -524,7 +524,7 @@ public function store($data, $post) if ($accessoryId > 0) { if (!$rowaccitem->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $rowaccitem->getError()); return false; } @@ -551,7 +551,7 @@ public function store($data, $post) if ($attributeId > 0) { if (!$rowattitem->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $rowattitem->getError()); return false; } @@ -581,7 +581,7 @@ public function store($data, $post) if ($propertyId > 0) { if (!$rowattitem->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $rowattitem->getError()); return false; } @@ -611,7 +611,7 @@ public function store($data, $post) if ($subPropertyId > 0) { if (!$rowattitem->store()) { /** @scrutinizer ignore-deprecated */ - $this->setError(/** @scrutinizer ignore-deprecated */ $this->_db->getErrorMsg()); + $this->setError(/** @scrutinizer ignore-deprecated */ $rowattitem->getError()); return false; } diff --git a/component/site/models/wishlist.php b/component/site/models/wishlist.php index 2b4818f0931..08eef135450 100644 --- a/component/site/models/wishlist.php +++ b/component/site/models/wishlist.php @@ -166,13 +166,13 @@ public function store($data) $row = $this->getTable(); if (!$row->bind($data)) { - $this->setError($this->_db->getErrorMsg()); + $this->setError($row->getError()); return false; } if (!$row->store()) { - $this->setError($this->_db->getErrorMsg()); + $this->setError($row->getError()); return false; } diff --git a/component/site/views/wishlist/tmpl/default.php b/component/site/views/wishlist/tmpl/default.php index 08f1c756e06..5eeaf8fdef2 100644 --- a/component/site/views/wishlist/tmpl/default.php +++ b/component/site/views/wishlist/tmpl/default.php @@ -127,7 +127,7 @@   + onclick="Joomla.submitform();"/>  diff --git a/libraries/redshop/helper/order.php b/libraries/redshop/helper/order.php index 9e563045757..154572d70c2 100644 --- a/libraries/redshop/helper/order.php +++ b/libraries/redshop/helper/order.php @@ -2003,14 +2003,7 @@ public static function updateOrderItemStatus( $query->where($db->qn('order_item_id') . ' = ' . (int)$orderItemId); } - $db->setQuery($query); - - if (!$db->execute()) { - JFactory::getApplication()->enqueueMessage( - /** @scrutinizer ignore-deprecated */ $db->getErrorMsg(), - 'error' - ); - } + $db->setQuery($query)->execute(); } /** From 14c95fe90d00d8f6292b053c986dda12dab6940c Mon Sep 17 00:00:00 2001 From: vshandak Date: Tue, 31 May 2022 14:13:04 +0300 Subject: [PATCH 03/14] override unsupported calls --- component/admin/controllers/prices_detail.php | 10 +- .../admin/controllers/xmlexport_detail.php | 2 +- component/admin/layouts/component/assets.php | 2 +- .../admin/layouts/joomla/form/renderfield.php | 2 +- .../product_detail/product_attribute.php | 2 +- .../layouts/searchtools/default/filters.php | 2 +- .../admin/layouts/shopper_group/logo.php | 2 +- component/admin/layouts/wrapper/image.php | 2 +- component/admin/models/accountgroup.php | 2 +- component/admin/models/attribute_set.php | 2 +- component/admin/models/attributeprices.php | 2 +- component/admin/models/catalog_request.php | 2 +- component/admin/models/prices.php | 2 +- component/admin/models/prices_detail.php | 5 +- component/admin/models/producttags.php | 2 +- component/admin/models/sample_request.php | 2 +- component/admin/models/shipping_rate.php | 2 +- component/admin/models/stockimage.php | 2 +- component/admin/models/user_detail.php | 2 +- component/admin/models/xmlexport.php | 2 +- component/admin/models/xmlimport.php | 2 +- .../admin/views/accountgroup/tmpl/default.php | 8 +- .../admin/views/addorder_detail/view.html.php | 22 +- .../views/addquotation_detail/view.html.php | 18 +- component/admin/views/alert/tmpl/default.php | 8 +- .../views/attribute_set/tmpl/default.php | 8 +- .../views/attribute_set_detail/view.html.php | 16 +- .../views/attributeprices/tmpl/default.php | 8 +- .../admin/views/attributeprices/view.html.php | 2 +- .../admin/views/attributes/tmpl/default.php | 8 +- .../views/catalog_request/tmpl/default.php | 8 +- .../admin/views/catalogs/tmpl/default.php | 2 +- component/admin/views/category/tmpl/edit.php | 2 +- component/admin/views/category/view.html.php | 14 +- .../default_cart_template_image_setting.php | 2 +- .../tmpl/default_cattab_nplinks.php | 2 +- .../tmpl/default_procat_images.php | 2 +- .../tmpl/default_registration.php | 2 +- .../tmpl/default_shopper_group.php | 2 +- .../admin/views/configuration/view.html.php | 5 +- component/admin/views/field/view.html.php | 5 +- component/admin/views/giftcard/tmpl/edit.php | 2 +- .../admin/views/giftcards/tmpl/default.php | 10 +- component/admin/views/import/tmpl/default.php | 9 +- .../admin/views/media/tmpl/additionalfile.php | 2 +- component/admin/views/media/tmpl/default.php | 10 +- component/admin/views/media/view.html.php | 9 +- .../admin/views/media_detail/tmpl/default.php | 2 +- .../admin/views/media_detail/view.html.php | 5 +- .../admin/views/newsletter/tmpl/edit.php | 2 +- .../newsletter_subscription/tmpl/edit.php | 2 +- .../newsletter_subscriptions/tmpl/default.php | 2 +- .../admin/views/newsletters/tmpl/default.php | 2 +- .../admin/views/opsearch/tmpl/default.php | 8 +- component/admin/views/order/tmpl/default.php | 8 +- .../admin/views/order/tmpl/labellisting.php | 8 +- component/admin/views/order/view.html.php | 2 +- .../admin/views/order_detail/tmpl/default.php | 2 +- .../admin/views/order_detail/view.html.php | 18 +- component/admin/views/plugins/view.html.php | 2 +- component/admin/views/prices/tmpl/default.php | 8 +- component/admin/views/prices/view.html.php | 2 +- .../admin/views/product/tmpl/default.php | 59 +++- .../admin/views/product/tmpl/element.php | 8 +- .../admin/views/product/tmpl/ins_product.php | 8 +- .../admin/views/product/tmpl/listing.php | 10 +- component/admin/views/product/view.html.php | 2 +- .../tmpl/default_general_data.php | 8 +- .../admin/views/product_detail/view.html.php | 19 +- .../admin/views/producttags/tmpl/default.php | 8 +- component/admin/views/promotion/tmpl/edit.php | 2 +- .../admin/views/promotions/tmpl/default.php | 2 +- component/admin/views/questions/view.html.php | 2 +- .../admin/views/quotation/tmpl/default.php | 8 +- .../views/quotation_detail/tmpl/default.php | 2 +- .../views/quotation_detail/view.html.php | 14 +- component/admin/views/rating/tmpl/edit.php | 2 +- .../admin/views/ratings/tmpl/default.php | 2 +- component/admin/views/sample/tmpl/edit.php | 4 +- .../views/sample_request/tmpl/default.php | 10 +- component/admin/views/search/view.html.php | 8 +- .../admin/views/shipping_method/tmpl/edit.php | 2 +- .../views/shipping_methods/tmpl/default.php | 2 +- .../views/shipping_rate/tmpl/default.php | 8 +- .../views/shipping_rate_detail/view.html.php | 5 +- .../admin/views/shoppergroup/tmpl/edit.php | 2 +- .../views/shoppergroups/tmpl/default.php | 2 +- .../views/statistic/tmpl/amountorder.php | 8 +- .../views/statistic/tmpl/amountprice.php | 8 +- .../views/statistic/tmpl/amountspent.php | 8 +- .../admin/views/statistic/tmpl/avrgorder.php | 8 +- .../admin/views/statistic/tmpl/bestsell.php | 8 +- .../admin/views/statistic/tmpl/default.php | 8 +- .../admin/views/statistic/tmpl/neworder.php | 8 +- .../admin/views/statistic/tmpl/newprod.php | 8 +- .../admin/views/statistic/tmpl/pageview.php | 8 +- .../views/statistic/tmpl/popularsell.php | 8 +- .../admin/views/statistic/tmpl/turnover.php | 8 +- component/admin/views/statistic/view.html.php | 4 +- .../views/statistic_quotation/view.html.php | 11 +- .../views/statistic_variant/view.html.php | 12 +- .../admin/views/stockimage/tmpl/default.php | 8 +- component/admin/views/stockroom/tmpl/edit.php | 2 +- .../views/stockroom_listing/tmpl/default.php | 8 +- .../admin/views/stockrooms/tmpl/default.php | 2 +- component/admin/views/user/tmpl/default.php | 8 +- .../views/user_detail/tmpl/default_order.php | 8 +- .../admin/views/user_detail/view.html.php | 10 +- .../admin/views/wizard/tmpl/price_vat.php | 2 +- component/admin/views/wizard/tmpl/terms.php | 2 +- .../views/wizard/tmpl/user_shopper_group.php | 2 +- component/admin/views/wizard/view.html.php | 12 +- component/admin/views/wrapper/tmpl/edit.php | 2 +- .../admin/views/wrappers/tmpl/default.php | 2 +- .../admin/views/xmlexport/tmpl/default.php | 8 +- .../views/xmlexport_detail/tmpl/default.php | 2 +- .../views/xmlexport_detail/view.html.php | 6 +- .../admin/views/xmlimport/tmpl/default.php | 8 +- .../views/xmlimport_detail/view.html.php | 6 +- component/admin/views/zipcode/tmpl/edit.php | 2 +- .../admin/views/zipcodes/tmpl/default.php | 2 +- component/site/controllers/order_detail.php | 5 +- component/site/controllers/product.php | 1 - component/site/layouts/assets.php | 15 +- component/site/models/account.php | 6 +- component/site/models/category.php | 6 +- component/site/models/manufacturers.php | 4 +- component/site/models/orders.php | 2 +- component/site/models/product_mini.php | 2 +- component/site/models/ratings.php | 2 +- component/site/models/search.php | 6 +- component/site/redshop.php | 12 +- component/site/views/account/view.html.php | 6 +- .../site/views/account_billto/view.html.php | 6 +- component/site/views/cart/tmpl/default.php | 2 +- component/site/views/cart/view.html.php | 5 +- .../views/category/tmpl/categoryproduct.php | 2 +- .../site/views/category/tmpl/default.php | 2 +- component/site/views/category/tmpl/detail.php | 2 +- component/site/views/category/view.html.php | 4 +- .../site/views/checkout/tmpl/default.php | 2 +- .../checkout/tmpl/default_checkoutnext.php | 2 +- .../views/checkout/tmpl/default_payment.php | 2 +- .../views/checkout/tmpl/default_shipping.php | 2 +- .../views/checkout/tmpl/onestepcheckout.php | 11 +- component/site/views/checkout/view.html.php | 26 +- component/site/views/checkout/view.next.php | 5 +- .../site/views/giftcard/tmpl/default.php | 2 +- .../site/views/manufacturers/tmpl/default.php | 2 +- .../site/views/manufacturers/tmpl/detail.php | 2 +- .../views/manufacturers/tmpl/products.php | 2 +- component/site/views/orders/tmpl/default.php | 2 +- .../site/views/price_filter/tmpl/default.php | 2 +- component/site/views/product/tmpl/compare.php | 2 +- component/site/views/product/tmpl/default.php | 2 +- .../views/product/tmpl/downloadproduct.php | 2 +- .../views/product/tmpl/viewajaxdetail.php | 2 +- .../site/views/product/tmpl/viewwishlist.php | 2 +- component/site/views/product/view.html.php | 4 +- component/site/views/quotation/view.html.php | 5 +- .../site/views/registration/view.html.php | 17 +- component/site/views/search/tmpl/default.php | 4 +- .../site/views/search/tmpl/productonsale.php | 4 +- component/site/views/search/view.html.php | 4 +- .../site/views/send_friend/tmpl/default.php | 6 +- .../site/views/send_friend/view.html.php | 4 +- .../site/views/wishlist/tmpl/default.php | 2 +- .../views/wishlist/tmpl/viewloginwishlist.php | 2 +- .../site/views/wishlist/tmpl/viewwishlist.php | 2 +- libraries/redshop/controller/admin.php | 44 +-- libraries/redshop/controller/form.php | 3 +- libraries/redshop/form/field/calendar.php | 2 +- libraries/redshop/form/fields/products.php | 2 +- libraries/redshop/form/fields/rdaterange.php | 10 +- libraries/redshop/helper/config.php | 4 +- libraries/redshop/helper/extrafields.php | 3 +- libraries/redshop/helper/media/image.php | 19 +- libraries/redshop/helper/product.php | 3 +- libraries/redshop/helper/utility.php | 6 +- libraries/redshop/html/redshopcalendar.php | 16 +- libraries/redshop/html/redshopgrid.php | 16 +- libraries/redshop/html/redshopjquery.php | 85 ++--- libraries/redshop/html/redshopmedia.php | 2 +- libraries/redshop/html/redshopsortable.php | 6 +- .../extrafields/userfield/document.php | 5 +- libraries/redshop/layouts/system/message.php | 61 ++-- libraries/redshop/model/list.php | 9 +- libraries/redshop/model/model.php | 6 +- libraries/redshop/src/Table/AbstractTable.php | 300 +----------------- libraries/redshop/tags/sections/cart.php | 4 +- .../redshop/tags/sections/categorydetail.php | 2 +- libraries/redshop/tags/sections/product.php | 4 +- libraries/redshop/tags/sections/wishlist.php | 4 +- .../redshop/toolbar/button/redshoplink.php | 22 +- libraries/redshop/view/list.php | 2 +- media/com_redshop/css/redshop.admin.css | 4 +- media/com_redshop/css/redshop.admin.min.css | 2 +- .../mod_redshop_search/mod_redshop_search.php | 9 +- plugins/finder/redshop/redshop.php | 6 +- plugins/quickicon/redshop/redshop.php | 14 +- .../promotion/layouts/awards.php | 2 +- .../promotion/layouts/conditions.php | 2 +- 202 files changed, 599 insertions(+), 1024 deletions(-) diff --git a/component/admin/controllers/prices_detail.php b/component/admin/controllers/prices_detail.php index d326b2f3387..f5fa6c50d97 100644 --- a/component/admin/controllers/prices_detail.php +++ b/component/admin/controllers/prices_detail.php @@ -7,6 +7,8 @@ * @license GNU General Public License version 2 or later; see LICENSE */ +use Joomla\CMS\Factory; + defined('_JEXEC') or die; @@ -52,7 +54,7 @@ public function save($apply = 0) $type = 'error'; $productId = $this->input->getInt('product_id'); $post['product_currency'] = Redshop::getConfig()->get('CURRENCY_CODE'); - $post['cdate'] = time(); + $post['cdate'] = Factory::getDate()->format('Y-m-d'); $cid = $this->input->post->get('cid', array(0), 'array'); $post ['price_id'] = $cid [0]; @@ -67,8 +69,6 @@ public function save($apply = 0) $row = $model->store($post); - $msg = JText::_('COM_REDSHOP_ERROR_SAVING_PRICE_QUNTITY_DETAIL'); - if ($row) { $type = ''; $msg = JText::_('COM_REDSHOP_PRICE_DETAIL_SAVED'); @@ -77,6 +77,10 @@ public function save($apply = 0) } elseif ($post['discount_start_date'] > $post['discount_end_date']) { $msg = JText::_('COM_REDSHOP_PRODUCT_PRICE_END_DATE_MUST_MORE_THAN_START_DATE'); } + else + { + $msg = $model->getError(); + } if ($apply == 0) { $this->setRedirect('index.php?option=com_redshop&view=prices&product_id=' . $productId, $msg, $type); diff --git a/component/admin/controllers/xmlexport_detail.php b/component/admin/controllers/xmlexport_detail.php index 67018a27ad9..d5074e4b24c 100644 --- a/component/admin/controllers/xmlexport_detail.php +++ b/component/admin/controllers/xmlexport_detail.php @@ -104,7 +104,7 @@ public function save($export = 0) function setChildElement() { - JHtml::_('rbootstrap.modal'); + JHtml::_('bootstrap.modal'); $xmlhelper = new xmlHelper; $post = $this->input->post->getArray(); diff --git a/component/admin/layouts/component/assets.php b/component/admin/layouts/component/assets.php index 91af291358e..3bf4d7cf95f 100644 --- a/component/admin/layouts/component/assets.php +++ b/component/admin/layouts/component/assets.php @@ -9,7 +9,7 @@ defined('_JEXEC') or die; -JHtml::_('rjquery.framework'); +JHtml::_('redshopjquery.framework'); JHtml::_('bootstrap.tooltip'); JHtml::_( 'redshopjquery.select2', diff --git a/component/admin/layouts/joomla/form/renderfield.php b/component/admin/layouts/joomla/form/renderfield.php index 782954a49e8..d8e0fd3f02b 100644 --- a/component/admin/layouts/joomla/form/renderfield.php +++ b/component/admin/layouts/joomla/form/renderfield.php @@ -18,7 +18,7 @@ */ if (!empty($displayData['options']['showonEnabled'])) { - JHtml::_('jquery.framework'); + JHtml::_('redshopjquery.framework'); JHtml::_('script', 'jui/cms.js', false, true); } diff --git a/component/admin/layouts/product_detail/product_attribute.php b/component/admin/layouts/product_detail/product_attribute.php index d1a0eb27adf..1b87586a3d3 100644 --- a/component/admin/layouts/product_detail/product_attribute.php +++ b/component/admin/layouts/product_detail/product_attribute.php @@ -9,7 +9,7 @@ */ defined('_JEXEC') or die; -JHtml::_('rbootstrap.modal', 'a.joom-box'); +JHtml::_('bootstrap.modal', 'a.joom-box'); $data = $displayData['this']; $productId = 0; $attributeSetId = 0; diff --git a/component/admin/layouts/searchtools/default/filters.php b/component/admin/layouts/searchtools/default/filters.php index 89e99f25c38..76af3ab27e3 100755 --- a/component/admin/layouts/searchtools/default/filters.php +++ b/component/admin/layouts/searchtools/default/filters.php @@ -49,7 +49,7 @@ getAttribute('dataShowOn')) { - JHtml::_('jquery.framework'); + JHtml::_('redshopjquery.framework'); JHtml::_('script', 'jui/cms.js', false, true); $showOn = " data-showon='" . $showOnData . "'"; } diff --git a/component/admin/layouts/shopper_group/logo.php b/component/admin/layouts/shopper_group/logo.php index 744f728aed1..5fbaf08a87e 100644 --- a/component/admin/layouts/shopper_group/logo.php +++ b/component/admin/layouts/shopper_group/logo.php @@ -8,7 +8,7 @@ * @license GNU General Public License version 2 or later; see LICENSE */ defined('_JEXEC') or die; -JHtml::_('rbootstrap.modal', 'a.joom-box'); +JHtml::_('bootstrap.modal', 'a.joom-box'); /** * Layout variables * ====================================== diff --git a/component/admin/layouts/wrapper/image.php b/component/admin/layouts/wrapper/image.php index faccb7095c0..2929a2cd9b3 100644 --- a/component/admin/layouts/wrapper/image.php +++ b/component/admin/layouts/wrapper/image.php @@ -8,7 +8,7 @@ * @license GNU General Public License version 2 or later; see LICENSE */ defined('_JEXEC') or die; -JHtml::_('rbootstrap.modal', 'a.joom-box'); +JHtml::_('bootstrap.modal', 'a.joom-box'); /** * Layout variables * ====================================== diff --git a/component/admin/models/accountgroup.php b/component/admin/models/accountgroup.php index 1e9e560e496..750a40ac4f5 100644 --- a/component/admin/models/accountgroup.php +++ b/component/admin/models/accountgroup.php @@ -82,7 +82,7 @@ public function getPagination() { if (empty($this->_pagination)) { jimport('joomla.html.pagination'); - $this->_pagination = new \RPagination( + $this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') diff --git a/component/admin/models/attribute_set.php b/component/admin/models/attribute_set.php index 48f54c661a2..69f962de5cc 100644 --- a/component/admin/models/attribute_set.php +++ b/component/admin/models/attribute_set.php @@ -80,7 +80,7 @@ public function getPagination() { if (empty($this->_pagination)) { jimport('joomla.html.pagination'); - $this->_pagination = new \RPagination( + $this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') diff --git a/component/admin/models/attributeprices.php b/component/admin/models/attributeprices.php index 9fa68a05891..7d123661df8 100644 --- a/component/admin/models/attributeprices.php +++ b/component/admin/models/attributeprices.php @@ -90,7 +90,7 @@ public function getPagination() { if (empty($this->_pagination)) { jimport('joomla.html.pagination'); - $this->_pagination = new \RPagination( + $this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') diff --git a/component/admin/models/catalog_request.php b/component/admin/models/catalog_request.php index ad43f56c8f6..215951890a2 100644 --- a/component/admin/models/catalog_request.php +++ b/component/admin/models/catalog_request.php @@ -81,7 +81,7 @@ public function getPagination() { if (empty($this->_pagination)) { jimport('joomla.html.pagination'); - $this->_pagination = new \RPagination( + $this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') diff --git a/component/admin/models/prices.php b/component/admin/models/prices.php index 25868ce3a65..bbfe0f25102 100644 --- a/component/admin/models/prices.php +++ b/component/admin/models/prices.php @@ -85,7 +85,7 @@ public function getPagination() { if (empty($this->_pagination)) { jimport('joomla.html.pagination'); - $this->_pagination = new \RPagination( + $this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') diff --git a/component/admin/models/prices_detail.php b/component/admin/models/prices_detail.php index 09da1c93795..e9270c51759 100644 --- a/component/admin/models/prices_detail.php +++ b/component/admin/models/prices_detail.php @@ -93,8 +93,6 @@ public function _initData() } else { $detail = new stdClass; $detail->price_id = 0; - $detail->product_id = $this->_prodid; - $detail->product_name = $this->_prodname; $detail->product_price = 0.00; $detail->product_currency = null; $detail->shopper_group_id = 0; @@ -106,6 +104,9 @@ public function _initData() $detail->discount_end_date = 0; } + $detail->product_id = $this->_prodid; + $detail->product_name = $this->_prodname; + $this->_data = $detail; return (boolean)$this->_data; diff --git a/component/admin/models/producttags.php b/component/admin/models/producttags.php index 635ffcd9f1c..501c9211eaa 100644 --- a/component/admin/models/producttags.php +++ b/component/admin/models/producttags.php @@ -87,7 +87,7 @@ public function getPagination() { if (empty($this->_pagination)) { jimport('joomla.html.pagination'); - $this->_pagination = new \RPagination( + $this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') diff --git a/component/admin/models/sample_request.php b/component/admin/models/sample_request.php index 0881a5b140e..b908c59f1c2 100644 --- a/component/admin/models/sample_request.php +++ b/component/admin/models/sample_request.php @@ -84,7 +84,7 @@ public function getPagination() { if (empty($this->_pagination)) { jimport('joomla.html.pagination'); - $this->_pagination = new \RPagination( + $this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') diff --git a/component/admin/models/shipping_rate.php b/component/admin/models/shipping_rate.php index eafb0751e29..75c99002392 100644 --- a/component/admin/models/shipping_rate.php +++ b/component/admin/models/shipping_rate.php @@ -108,7 +108,7 @@ public function getPagination() { if (empty($this->_pagination)) { jimport('joomla.html.pagination'); - $this->_pagination = new \RPagination( + $this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') ); diff --git a/component/admin/models/stockimage.php b/component/admin/models/stockimage.php index 7d85669c304..59d0bba356f 100644 --- a/component/admin/models/stockimage.php +++ b/component/admin/models/stockimage.php @@ -90,7 +90,7 @@ public function getPagination() { if (empty($this->_pagination)) { jimport('joomla.html.pagination'); - $this->_pagination = new \RPagination( + $this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') diff --git a/component/admin/models/user_detail.php b/component/admin/models/user_detail.php index 6d6da45f420..e2c93125965 100644 --- a/component/admin/models/user_detail.php +++ b/component/admin/models/user_detail.php @@ -374,7 +374,7 @@ public function getPagination() { if (empty($this->_pagination)) { jimport('joomla.html.pagination'); - $this->_pagination = new \RPagination( + $this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') diff --git a/component/admin/models/xmlexport.php b/component/admin/models/xmlexport.php index 543ba2aa4a9..865cbd2f170 100644 --- a/component/admin/models/xmlexport.php +++ b/component/admin/models/xmlexport.php @@ -84,7 +84,7 @@ public function getPagination() { if (empty($this->_pagination)) { jimport('joomla.html.pagination'); - $this->_pagination = new \RPagination( + $this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') diff --git a/component/admin/models/xmlimport.php b/component/admin/models/xmlimport.php index 214f925b454..b1dca32ea64 100644 --- a/component/admin/models/xmlimport.php +++ b/component/admin/models/xmlimport.php @@ -84,7 +84,7 @@ public function getPagination() { if (empty($this->_pagination)) { jimport('joomla.html.pagination'); - $this->_pagination = new \RPagination( + $this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') diff --git a/component/admin/views/accountgroup/tmpl/default.php b/component/admin/views/accountgroup/tmpl/default.php index 2201a64ce2f..7e59709edde 100644 --- a/component/admin/views/accountgroup/tmpl/default.php +++ b/component/admin/views/accountgroup/tmpl/default.php @@ -138,11 +138,9 @@ } ?> - =')): ?> -
- pagination->getLimitBox(); ?> -
- +
+ pagination->getLimitBox(); ?> +
pagination->getListFooter(); ?> diff --git a/component/admin/views/addorder_detail/view.html.php b/component/admin/views/addorder_detail/view.html.php index 9861b0a6e74..c5eb13bcbc9 100644 --- a/component/admin/views/addorder_detail/view.html.php +++ b/component/admin/views/addorder_detail/view.html.php @@ -7,6 +7,8 @@ * @license GNU General Public License version 2 or later; see LICENSE */ +use Joomla\CMS\HTML\HTMLHelper; + defined('_JEXEC') or die; /** @@ -46,16 +48,16 @@ public function display($tpl = null) $document = JFactory::getDocument(); $document->setTitle(JText::_('COM_REDSHOP_ORDER')); - /** @scrutinizer ignore-deprecated */ - RHtml::script('com_redshop/json.min.js', false, true); - /** @scrutinizer ignore-deprecated */ - RHtml::script('com_redshop/redshop.validation.min.js', false, true); - /** @scrutinizer ignore-deprecated */ - RHtml::script('com_redshop/redshop.order.min.js', false, true); - /** @scrutinizer ignore-deprecated */ - RHtml::script('com_redshop/redshop.admin.common.min.js', false, true); - /** @scrutinizer ignore-deprecated */ - RHtml::script('com_redshop/ajaxupload.min.js', false, true); + + HTMLHelper::script('com_redshop/json.min.js', ['relative' => true]); + + HTMLHelper::script('com_redshop/redshop.validation.min.js', ['relative' => true]); + + HTMLHelper::script('com_redshop/redshop.order.min.js', ['relative' => true]); + + HTMLHelper::script('com_redshop/redshop.admin.common.min.js', ['relative' => true]); + + HTMLHelper::script('com_redshop/ajaxupload.min.js', ['relative' => true]); $uri = JUri::getInstance(); $lists = array(); diff --git a/component/admin/views/addquotation_detail/view.html.php b/component/admin/views/addquotation_detail/view.html.php index 444e0107a82..a6bceec4536 100644 --- a/component/admin/views/addquotation_detail/view.html.php +++ b/component/admin/views/addquotation_detail/view.html.php @@ -7,6 +7,8 @@ * @license GNU General Public License version 2 or later; see LICENSE */ +use Joomla\CMS\HTML\HTMLHelper; + defined('_JEXEC') or die; @@ -32,16 +34,12 @@ public function display($tpl = null) $document->setTitle(JText::_('COM_REDSHOP_QUOTATION_MANAGEMENT')); - /** @scrutinizer ignore-deprecated */ - RHtml::script('com_redshop/json.min.js', false, true); - /** @scrutinizer ignore-deprecated */ - RHtml::script('com_redshop/redshop.validation.min.js', false, true); - /** @scrutinizer ignore-deprecated */ - RHtml::script('com_redshop/redshop.order.min.js', false, true); - /** @scrutinizer ignore-deprecated */ - RHtml::script('com_redshop/redshop.admin.common.min.js', false, true); - /** @scrutinizer ignore-deprecated */ - RHtml::script('com_redshop/ajaxupload.min.js', false, true); + HTMLHelper::script('com_redshop/json.min.js', ['relative' => true]); + HTMLHelper::script('com_redshop/redshop.validation.min.js', ['relative' => true]); + HTMLHelper::script('com_redshop/redshop.order.min.js', ['relative' => true]); + HTMLHelper::script('com_redshop/redshop.admin.common.min.js', ['relative' => true]); + HTMLHelper::script('com_redshop/ajaxupload.min.js', ['relative' => true]); + $session = JFactory::getSession(); $uri = JUri::getInstance(); diff --git a/component/admin/views/alert/tmpl/default.php b/component/admin/views/alert/tmpl/default.php index 372c5bb9215..3e1e49c7d88 100644 --- a/component/admin/views/alert/tmpl/default.php +++ b/component/admin/views/alert/tmpl/default.php @@ -115,11 +115,9 @@ - =')): ?> -
- pagination->getLimitBox(); ?> -
- +
+ pagination->getLimitBox(); ?> +
pagination->getListFooter(); ?> diff --git a/component/admin/views/attribute_set/tmpl/default.php b/component/admin/views/attribute_set/tmpl/default.php index ef6b295551f..4300633cd63 100644 --- a/component/admin/views/attribute_set/tmpl/default.php +++ b/component/admin/views/attribute_set/tmpl/default.php @@ -81,11 +81,9 @@ } ?> - =')): ?> -
- pagination->getLimitBox(); ?> -
- +
+ pagination->getLimitBox(); ?> +
pagination->getListFooter(); ?> diff --git a/component/admin/views/attribute_set_detail/view.html.php b/component/admin/views/attribute_set_detail/view.html.php index 1b07d4520d9..c180410c961 100644 --- a/component/admin/views/attribute_set_detail/view.html.php +++ b/component/admin/views/attribute_set_detail/view.html.php @@ -7,6 +7,8 @@ * @license GNU General Public License version 2 or later; see LICENSE */ +use Joomla\CMS\HTML\HTMLHelper; + defined('_JEXEC') or die; @@ -36,17 +38,9 @@ public function display($tpl = null) " ); - if (version_compare(JVERSION, '3.0', '<')) { - /** @scrutinizer ignore-deprecated */ - RHtml::stylesheet('com_redshop/redshop.update.min.css', array(), true); - } - - /** @scrutinizer ignore-deprecated */ - RHtml::script('com_redshop/redshop.attribute-manipulation.min.js', false, true); - /** @scrutinizer ignore-deprecated */ - RHtml::script('com_redshop/redshop.fields.min.js', false, true); - /** @scrutinizer ignore-deprecated */ - RHtml::script('com_redshop/redshop.validation.min.js', false, true); + HTMLHelper::script('com_redshop/redshop.attribute-manipulation.min.js', ['relative' => true]); + HTMLHelper::script('com_redshop/redshop.fields.min.js', ['relative' => true]); + HTMLHelper::script('com_redshop/redshop.validation.min.js', ['relative' => true]); $uri = JUri::getInstance(); diff --git a/component/admin/views/attributeprices/tmpl/default.php b/component/admin/views/attributeprices/tmpl/default.php index dc373d420d3..c1cd42c058b 100644 --- a/component/admin/views/attributeprices/tmpl/default.php +++ b/component/admin/views/attributeprices/tmpl/default.php @@ -78,11 +78,9 @@ } ?> - =')): ?> -
- pagination->getLimitBox(); ?> -
- +
+ pagination->getLimitBox(); ?> +
pagination->getListFooter(); ?> diff --git a/component/admin/views/attributeprices/view.html.php b/component/admin/views/attributeprices/view.html.php index 03e03479481..1e4dee2d20a 100644 --- a/component/admin/views/attributeprices/view.html.php +++ b/component/admin/views/attributeprices/view.html.php @@ -37,7 +37,7 @@ public function display($tpl = null) $total = $this->get('Total'); $data = $this->get('Data'); - $pagination = new \RPagination($total, $limitstart, $limit); + $pagination = new JPagination($total, $limitstart, $limit); $this->user = JFactory::getUser(); $this->data = $data; diff --git a/component/admin/views/attributes/tmpl/default.php b/component/admin/views/attributes/tmpl/default.php index f4b8d800f02..961fa812627 100644 --- a/component/admin/views/attributes/tmpl/default.php +++ b/component/admin/views/attributes/tmpl/default.php @@ -132,11 +132,9 @@ class="hasTooltip" - =')): ?> -
- pagination->getLimitBox(); ?> -
- +
+ pagination->getLimitBox(); ?> +
pagination->getListFooter(); ?> diff --git a/component/admin/views/catalog_request/tmpl/default.php b/component/admin/views/catalog_request/tmpl/default.php index 91e5a4a7bf6..f9b05802587 100644 --- a/component/admin/views/catalog_request/tmpl/default.php +++ b/component/admin/views/catalog_request/tmpl/default.php @@ -137,11 +137,9 @@ function clearreset() { ?> - =')): ?> -
- pagination->getLimitBox(); ?> -
- +
+ pagination->getLimitBox(); ?> +
pagination->getListFooter(); ?> diff --git a/component/admin/views/catalogs/tmpl/default.php b/component/admin/views/catalogs/tmpl/default.php index 2090e178653..0282e2d0b2f 100644 --- a/component/admin/views/catalogs/tmpl/default.php +++ b/component/admin/views/catalogs/tmpl/default.php @@ -9,6 +9,6 @@ */ defined('_JEXEC') or die; -JHtml::_('rbootstrap.modal', '.joom-box'); +JHtml::_('bootstrap.modal', '.joom-box'); echo RedshopLayoutHelper::render('view.list', array('data' => $this)); diff --git a/component/admin/views/category/tmpl/edit.php b/component/admin/views/category/tmpl/edit.php index a4b3e2f4db1..c18335d8871 100644 --- a/component/admin/views/category/tmpl/edit.php +++ b/component/admin/views/category/tmpl/edit.php @@ -9,7 +9,7 @@ */ defined('_JEXEC') or die; -JHtml::_('rbootstrap.modal'); +JHtml::_('bootstrap.modal'); JHtml::_('behavior.formvalidator'); ?> + 'index.php?option=com_redshop&showall=1&view=wrapper&layout=edit&tmpl=component&product_id=' . $product->product_id, - 'height' => '450px', - 'width' => '700px', - ) - ); -endforeach; +echo HTMLHelper::_( + 'bootstrap.renderModal', + 'ModalSelect', + [ + 'height' => '400px', + 'width' => '800px', + 'bodyHeight' => 70, + 'modalWidth' => 80, + ] +); diff --git a/component/admin/views/product_detail/tmpl/attribute_color.php b/component/admin/views/product_detail/tmpl/attribute_color.php index 425f06367e1..c6d6fd86139 100644 --- a/component/admin/views/product_detail/tmpl/attribute_color.php +++ b/component/admin/views/product_detail/tmpl/attribute_color.php @@ -33,7 +33,7 @@
- +
@@ -324,4 +327,29 @@ function jimage_insert(main_path, fid, fsec) { } } } + + (function($){ + $(document).ready(function () { + $('.ModalProductDetailButton').on('click', function () { + var modal = $('#ModalProductDetail'); + var frame = modal.find('iframe'); + if (frame.length) { + frame.remove(); + } + modal.find('.modal-body').append('