Skip to content

Commit

Permalink
Merge pull request #95 from mageplaza/2.4-develop
Browse files Browse the repository at this point in the history
2.4 develop
  • Loading branch information
phutx authored Feb 8, 2023
2 parents 719f98a + 0cfd14e commit 2aa5b92
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 120 deletions.
4 changes: 2 additions & 2 deletions Block/Adminhtml/Slider/Edit/Tab/Renderer/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
5 changes: 2 additions & 3 deletions Block/CategoryId.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
1 change: 0 additions & 1 deletion Block/CustomProducts.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
use Magento\GroupedProduct\Model\Product\Type\Grouped;
use Mageplaza\Productslider\Helper\Data;


/**
* Class CustomProducts
* @package Mageplaza\Productslider\Block
Expand Down
3 changes: 1 addition & 2 deletions Block/Widget/Slider.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ public function __construct(
Configurable $configurable,
LayoutFactory $layoutFactory,
array $data = []
)
{
) {
parent::__construct(
$context,
$productCollectionFactory,
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down
225 changes: 115 additions & 110 deletions i18n/en_US.csv
Original file line number Diff line number Diff line change
@@ -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 <b>Yes</b> to enable this module.<br />
1. It helps to reduce abandonment cart with <a href=""https://www.mageplaza.com/magento-2-one-step-checkout-extension/"" target=""_blank"">One Step Checkout</a>. <br />
2. Magento stores see upwards of 30% revenue 💰 with AVADA. <a href=""https://go.avada.io/mageplaza"">Learn more</a>","Select <b>Yes</b> to enable this module.<br />
1. It helps to reduce abandonment cart with <a href=""https://www.mageplaza.com/magento-2-one-step-checkout-extension/"" target=""_blank"">One Step Checkout</a>. <br />
2. Magento stores see upwards of 30% revenue 💰 with AVADA. <a href=""https://go.avada.io/mageplaza"">Learn more</a>"
"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"

0 comments on commit 2aa5b92

Please sign in to comment.