Skip to content

Commit

Permalink
Code checked with PHPCS and PHPCB.
Browse files Browse the repository at this point in the history
  • Loading branch information
miroslav-sc committed Jul 9, 2024
1 parent d2a9bce commit 89c54c5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion view/adminhtml/templates/readPlans.phtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script>
var nuveiData = <?php echo /* @noEscape */ $block->getPaymentPlans(); ?>;
var nuveiData = <?php echo $block->escapeHtml($block->getPaymentPlans()); ?>;
var nuveiPaymentPlans = nuveiData.plans;
var nuveiDropdownPlanVal = 1;

Expand Down
2 changes: 1 addition & 1 deletion view/adminhtml/templates/system/config/getPlans.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
url: '<?php echo $block->escapeUrl($block->getAjaxUrl()); ?>',
showLoader: true,
data: {
form_key:'<?php echo /* @noEscape */ $block->getFormKey(); ?>'
form_key:'<?php echo $block->escapeHtml($block->getFormKey()); ?>'
},
type: "POST",

Expand Down
9 changes: 4 additions & 5 deletions view/frontend/templates/product_plan_details.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
type: 'get',
url: '<?php echo $block->escapeUrl($nuvei_texts['nuvei_ajax_url']); ?>',
data: {
prodId: '<?php echo /* @noEscape */ $nuvei_texts['nuvei_prod_id']; ?>',
prodId: '<?php echo $block->escapeUrl($nuvei_texts['nuvei_prod_id']); ?>',
params: strParams
},
cache: false,
Expand Down Expand Up @@ -99,12 +99,11 @@
var _self = $(this);
var attrId = _self.attr('id').replace('attribute', '');
var nuveiAttrVal = _self.val();
var nuveiAttrId = '<?php echo $block->escapeHtml($nuvei_texts['nuvei_attr_id']); ?>';

console.log('nuvei change option', [attrId, nuveiAttrVal, '<?php echo $nuvei_texts['nuvei_attr_id']; ?>']);
console.log('nuvei change option', [attrId, nuveiAttrVal, nuveiAttrId]);

if('<?php echo $block->escapeHtml($nuvei_texts['nuvei_attr_id']); ?>' == attrId
&& '' != nuveiAttrVal
) {
if(nuveiAttrId == attrId && '' != nuveiAttrVal) {
nuveiShowPlanDetails(attrId + '=' + nuveiAttrVal);
}
else {
Expand Down

0 comments on commit 89c54c5

Please sign in to comment.