-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from YotpoLtd/v1.4.7
v1.4.7: Added advanced configuration options to control where to load the snippet ('Load Yotpo JS Snippet' and related options).
- Loading branch information
Showing
9 changed files
with
194 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace Yotpo\Loyalty\Model\Adminhtml\Source; | ||
|
||
use Magento\Framework\Option\ArrayInterface; | ||
|
||
/** | ||
* Yotpo Loyalty LoadJsSnippet source model. | ||
* | ||
* @category Loyalty | ||
* @package Loyalty_Loyalty | ||
*/ | ||
class LoadJsSnippet implements ArrayInterface | ||
{ | ||
public function toOptionArray() | ||
{ | ||
return [ | ||
['value' => 'all', 'label' => __('On All Pages')], | ||
['value' => 'checkout', 'label' => __('Only on Checkout')], | ||
['value' => 'checkout_cart', 'label' => __('Only on Checkout & Cart')], | ||
['value' => 'url_path_patterns', 'label' => __('Only on Specified Paths (Using Regex)')], | ||
]; | ||
} | ||
|
||
public function toArray() | ||
{ | ||
return [ | ||
'all' => __('On All Pages'), | ||
'checkout' => __('Only on Checkout'), | ||
'checkout_cart' => __('Only on Checkout & Cart'), | ||
'url_path_patterns' => __('Only on Specified Paths (Using Regex)'), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ | |
|
||
class Save implements ObserverInterface | ||
{ | ||
|
||
/** | ||
* @var \Magento\Store\Model\StoreManagerInterface | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters