diff --git a/Block/Adminhtml/Slider/Edit/Tab/Renderer/Category.php b/Block/Adminhtml/Slider/Edit/Tab/Renderer/Category.php index e7f3d3f..4fd35f6 100644 --- a/Block/Adminhtml/Slider/Edit/Tab/Renderer/Category.php +++ b/Block/Adminhtml/Slider/Edit/Tab/Renderer/Category.php @@ -165,9 +165,9 @@ public function getScriptHtml() * * @return array */ - public function getValues() + public function getValues(): array { - $values = $this->getValue(); + $values = (string)$this->getValue(); if (!is_array($values)) { $values = explode(',', $values); } diff --git a/Block/CategoryId.php b/Block/CategoryId.php index dc0527f..c27009e 100644 --- a/Block/CategoryId.php +++ b/Block/CategoryId.php @@ -122,8 +122,7 @@ public function getProductIdsByCategory() if (is_array($catIds)) { $productId = []; - foreach($catIds as $cat) - { + foreach ($catIds as $cat) { $collection = $this->_productCollectionFactory->create(); $category = $this->_categoryFactory->create()->load($cat); $collection->addAttributeToSelect('*')->addCategoryFilter($category); @@ -134,7 +133,7 @@ public function getProductIdsByCategory() $productIds = array_merge($productIds, $productId); } - }else { + } else { $collection = $this->_productCollectionFactory->create(); $category = $this->_categoryFactory->create()->load($catIds); $collection->addAttributeToSelect('*')->addCategoryFilter($category); diff --git a/Block/CustomProducts.php b/Block/CustomProducts.php index cfd9a89..00119cb 100644 --- a/Block/CustomProducts.php +++ b/Block/CustomProducts.php @@ -32,7 +32,6 @@ use Magento\GroupedProduct\Model\Product\Type\Grouped; use Mageplaza\Productslider\Helper\Data; - /** * Class CustomProducts * @package Mageplaza\Productslider\Block diff --git a/Block/Widget/Slider.php b/Block/Widget/Slider.php index 8cf340a..de0d377 100644 --- a/Block/Widget/Slider.php +++ b/Block/Widget/Slider.php @@ -81,8 +81,7 @@ public function __construct( Configurable $configurable, LayoutFactory $layoutFactory, array $data = [] - ) - { + ) { parent::__construct( $context, $productCollectionFactory, diff --git a/composer.json b/composer.json index 8f83c75..4cbfea0 100644 --- a/composer.json +++ b/composer.json @@ -2,10 +2,10 @@ "name": "mageplaza/magento-2-product-slider", "description": "Magento 2 Product Slider", "require": { - "mageplaza/module-core": "^1.4.5" + "mageplaza/module-core": "^1.5.1" }, "type": "magento2-module", - "version": "4.0.2", + "version": "4.0.3", "license": "proprietary", "authors": [ { diff --git a/i18n/en_US.csv b/i18n/en_US.csv index a2415bb..44cfc88 100644 --- a/i18n/en_US.csv +++ b/i18n/en_US.csv @@ -1,110 +1,115 @@ -"Screen size max","Screen size max" -"Number of items","Number of items" -Add,Add -Sliders,Sliders -"Create New Slider","Create New Slider" -"Edit Slider '%1'","Edit Slider '%1'" -"New Slider","New Slider" -"Save and Continue Edit","Save and Continue Edit" -Design,Design -Title,Title -Description,Description -"Limit the number of products","Limit the number of products" -"Display additional information","Display additional information" -"Select information or button(s) to display with products.","Select information or button(s) to display with products." -"Is Responsive","Is Responsive" -Yes,Yes -No,No -"Use Config","Use Config" -"Max Items slider","Max Items slider" -"General Information","General Information" -Name,Name -Status,Status -Enable,Enable -Disable,Disable -Position,Position -Type,Type -Categories,Categories -"Store Views","Store Views" -"Customer Groups","Customer Groups" -"Select customer group(s) to display the block to","Select customer group(s) to display the block to" -"Cache Lifetime","Cache Lifetime" -"seconds. 86400 by default, if not set. To refresh instantly, clear the Blocks HTML Output cache.","seconds. 86400 by default, if not set. To refresh instantly, clear the Blocks HTML Output cache." -"From Date","From Date" -From,From -"To Date","To Date" -To,To -"Product ID","Product ID" -Sku,Sku -Price,Price -"Select Products","Select Products" -"Product Slider Information","Product Slider Information" -"The Slider has been deleted.","The Slider has been deleted." -"This Slider no longer exists.","This Slider no longer exists." -"A total of %1 record(s) have been deleted.","A total of %1 record(s) have been deleted." -"Something went wrong while updating status for %1.","Something went wrong while updating status for %1." -"A total of %1 record(s) have been updated.","A total of %1 record(s) have been updated." -"The Slider has been saved.","The Slider has been saved." -"Something went wrong while saving the Slider. %1","Something went wrong while saving the Slider. %1" -"Add to cart button","Add to cart button" -"Review information","Review information" -"All Page","All Page" -"Top of content","Top of content" -"Bottom of content","Bottom of content" -"Top of sidebar","Top of sidebar" -"Bottom of sidebar","Bottom of sidebar" -"Home Page","Home Page" -"Category page","Category page" -"Product page","Product page" -"Shopping Cart Page","Shopping Cart Page" -"New Products","New Products" -"Best Seller Products","Best Seller Products" -"Featured Products","Featured Products" -"Most Viewed Products","Most Viewed Products" -"On Sale Products","On Sale Products" -"Recent Products","Recent Products" -"Select By Category","Select By Category" -"Custom Specific Products","Custom Specific Products" -"End Date must follow Start Date.","End Date must follow Start Date." -Edit,Edit -"Add to Cart","Add to Cart" -"In stock","In stock" -"Out of stock","Out of stock" -"Add to Wish List","Add to Wish List" -"Add to Compare","Add to Compare" -"Product Slider","Product Slider" -"General Configuration","General Configuration" -"Select Yes to enable this module","Select Yes to enable this module" -"Default displayed additional info","Default displayed additional info" -"This default settings will be used when using code to insert the slider","This default settings will be used when using code to insert the slider" -"Slider Design Configuration","Slider Design Configuration" -Responsive,Responsive -"Loop Slider","Loop Slider" -"Select Yes to re-display the slider after it shows the last item","Select Yes to re-display the slider after it shows the last item" -"Margin Between Items","Margin Between Items" -"pixel. This is the distance between two items in the slider","pixel. This is the distance between two items in the slider" -"Next/Prev buttons","Next/Prev buttons" -"Select Yes to display the Next/Pre button in the slider","Select Yes to display the Next/Pre button in the slider" -"Show Dots Navigation","Show Dots Navigation" -"Select Yes to display dot navigation of the slider","Select Yes to display dot navigation of the slider" -"Lazy load images","Lazy load images" -"Select Yes to lazy load images","Select Yes to lazy load images" -Autoplay,Autoplay -"Select Yes to allow auto-displaying the next products","Select Yes to allow auto-displaying the next products" -"Autoplay TimeOut","Autoplay TimeOut" -"ms. This is the time which an item is auto-moved to the left","ms. This is the time which an item is auto-moved to the left" -"Autoplay HoverPause","Autoplay HoverPause" -"Select Yes to stop the slider when hovering the mouse over the slider area","Select Yes to stop the slider when hovering the mouse over the slider area" -"Mageplaza Product Slider","Mageplaza Product Slider" -"Display Page Control","Display Page Control" -"Select Slider","Select Slider" -"Add New Slider","Add New Slider" -Delete,Delete -"Delete Slider","Delete Slider" -"Are you sure you wan't to delete selected Slider?","Are you sure you wan't to delete selected Slider?" -"Change status","Change status" -ID,ID -"Slider Type","Slider Type" -"Slider Location","Slider Location" -"Start Date","Start Date" -"End Date","End Date" +"Screen size max","Screen size max" +"Number of items","Number of items" +Add,Add +Sliders,Sliders +"Create New Slider","Create New Slider" +"Edit Slider '%1'","Edit Slider '%1'" +"New Slider","New Slider" +"Save and Continue Edit","Save and Continue Edit" +Design,Design +Title,Title +Description,Description +"Limit the number of products","Limit the number of products" +"Display additional information","Display additional information" +"Select information or button(s) to display with products.","Select information or button(s) to display with products." +"Is Responsive","Is Responsive" +Yes,Yes +No,No +"Use Config","Use Config" +"Max Items slider","Max Items slider" +"Default: 3 items.","Default: 3 items." +"General Information","General Information" +Name,Name +Status,Status +Enable,Enable +Disable,Disable +Position,Position +Type,Type +Categories,Categories +"Store Views","Store Views" +"Customer Groups","Customer Groups" +"Select customer group(s) to display the block to","Select customer group(s) to display the block to" +"Cache Lifetime","Cache Lifetime" +"seconds. 86400 by default, if not set. To refresh instantly, clear the Blocks HTML Output cache.","seconds. 86400 by default, if not set. To refresh instantly, clear the Blocks HTML Output cache." +"From Date","From Date" +From,From +"To Date","To Date" +To,To +"Product ID","Product ID" +Sku,Sku +Price,Price +"Select Products","Select Products" +"Product Slider Information","Product Slider Information" +"The Slider has been deleted.","The Slider has been deleted." +"This Slider no longer exists.","This Slider no longer exists." +"A total of %1 record(s) have been deleted.","A total of %1 record(s) have been deleted." +"Something went wrong while updating status for %1.","Something went wrong while updating status for %1." +"A total of %1 record(s) have been updated.","A total of %1 record(s) have been updated." +"The Slider has been saved.","The Slider has been saved." +"Something went wrong while saving the Slider. %1","Something went wrong while saving the Slider. %1" +"Add to cart button","Add to cart button" +"Review information","Review information" +"All Page","All Page" +"Top of content","Top of content" +"Bottom of content","Bottom of content" +"Top of sidebar","Top of sidebar" +"Bottom of sidebar","Bottom of sidebar" +"Home Page","Home Page" +"Category page","Category page" +"Product page","Product page" +"Shopping Cart Page","Shopping Cart Page" +"New Products","New Products" +"Best Seller Products","Best Seller Products" +"Featured Products","Featured Products" +"Most Viewed Products","Most Viewed Products" +"On Sale Products","On Sale Products" +"Recent Products","Recent Products" +"Select By Category","Select By Category" +"Custom Specific Products","Custom Specific Products" +"End Date must follow Start Date.","End Date must follow Start Date." +Edit,Edit +"Add to Cart","Add to Cart" +"In stock","In stock" +"Out of stock","Out of stock" +"Add to Wish List","Add to Wish List" +"Add to Compare","Add to Compare" +"Product Slider","Product Slider" +"General Configuration","General Configuration" +"Select Yes to enable this module.
+ 1. It helps to reduce abandonment cart with One Step Checkout.
+ 2. Magento stores see upwards of 30% revenue 💰 with AVADA. Learn more","Select Yes to enable this module.
+ 1. It helps to reduce abandonment cart with One Step Checkout.
+ 2. Magento stores see upwards of 30% revenue 💰 with AVADA. Learn more" +"Default displayed additional info","Default displayed additional info" +"This default settings will be used when using code to insert the slider","This default settings will be used when using code to insert the slider" +"Slider Design Configuration","Slider Design Configuration" +Responsive,Responsive +"Loop Slider","Loop Slider" +"Select Yes to re-display the slider after it shows the last item","Select Yes to re-display the slider after it shows the last item" +"Margin Between Items","Margin Between Items" +"pixel. This is the distance between two items in the slider","pixel. This is the distance between two items in the slider" +"Next/Prev buttons","Next/Prev buttons" +"Select Yes to display the Next/Pre button in the slider","Select Yes to display the Next/Pre button in the slider" +"Show Dots Navigation","Show Dots Navigation" +"Select Yes to display dot navigation of the slider","Select Yes to display dot navigation of the slider" +"Lazy load images","Lazy load images" +"Select Yes to lazy load images","Select Yes to lazy load images" +Autoplay,Autoplay +"Select Yes to allow auto-displaying the next products","Select Yes to allow auto-displaying the next products" +"Autoplay TimeOut","Autoplay TimeOut" +"ms. This is the time which an item is auto-moved to the left","ms. This is the time which an item is auto-moved to the left" +"Autoplay HoverPause","Autoplay HoverPause" +"Select Yes to stop the slider when hovering the mouse over the slider area","Select Yes to stop the slider when hovering the mouse over the slider area" +"Mageplaza Product Slider","Mageplaza Product Slider" +"Display Page Control","Display Page Control" +"Select Slider","Select Slider" +"Add New Slider","Add New Slider" +Delete,Delete +"Delete Slider","Delete Slider" +"Are you sure you wan't to delete selected Slider?","Are you sure you wan't to delete selected Slider?" +"Change status","Change status" +ID,ID +"Slider Type","Slider Type" +"Slider Location","Slider Location" +"Start Date","Start Date" +"End Date","End Date"