Closed HartLarsson closed 1 year ago
Hello,
you probably have a module that assign the same variable than Stripe module. If you follow the compiled template line 26, you’ll found the variable name and can look for it in your module directory.
@clotairer this is the line 26
<a class="col-lg-4 col-md-6 col-sm-6 col-xs-12" href="<?php echo htmlspecialchars(call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'escape' ][ 0 ], array( $_smarty_tpl->tpl_vars['link']->value->getModuleLink('stripe_official','stripeCards'),'html','UTF-8' )), ENT_QUOTES, 'UTF-8');?>
is stripe
I think you have somewhere an other assignation of var 'link' on smarty that is in conflict with Stripe assignation. The link from Stripe is an object and in an other assignation a string.
this is the full file:
<?php
/* Smarty version 3.1.43, created on 2022-12-22 15:50:21
from '/home2/userxxx/public_html/modules/stripe_official/views/templates/hook/my-account-stripe-cards.tpl' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '3.1.43',
'unifunc' => 'content_63a46ead20f6f5_74488283',
'has_nocache_code' => false,
'file_dependency' =>
array (
'ce8ff79e11cd645f0c04c68abbbba935458da99c' =>
array (
0 => '/home2/userxxx/public_html/modules/stripe_official/views/templates/hook/my-account-stripe-cards.tpl',
1 => 1671533087,
2 => 'file',
),
),
'includes' =>
array (
),
),false)) {
function content_63a46ead20f6f5_74488283 (Smarty_Internal_Template $_smarty_tpl) {
if ($_smarty_tpl->tpl_vars['isSaveCard']->value) {?>
<?php if ($_smarty_tpl->tpl_vars['prestashop_version']->value == '1.7') {?>
<a class="col-lg-4 col-md-6 col-sm-6 col-xs-12" href="<?php echo htmlspecialchars(call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'escape' ][ 0 ], array( $_smarty_tpl->tpl_vars['link']->value->getModuleLink('stripe_official','stripeCards'),'html','UTF-8' )), ENT_QUOTES, 'UTF-8');?>
" title="<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['l'][0], array( array('s'=>'My cards','mod'=>'stripe_official'),$_smarty_tpl ) );?>
">
<span class="link-item">
<i class="material-icons md-36">payment</i>
<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['l'][0], array( array('s'=>'My cards','mod'=>'stripe_official'),$_smarty_tpl ) );?>
</span>
</a>
<?php } else { ?>
<li>
<a href="<?php echo htmlspecialchars(call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'escape' ][ 0 ], array( $_smarty_tpl->tpl_vars['link']->value->getModuleLink('stripe_official','stripeCards'),'html','UTF-8' )), ENT_QUOTES, 'UTF-8');?>
" title="<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['l'][0], array( array('s'=>'My cards','mod'=>'stripe_official'),$_smarty_tpl ) );?>
">
<i class="icon-credit-card"></i>
<span><?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['l'][0], array( array('s'=>'My cards','mod'=>'stripe_official'),$_smarty_tpl ) );?>
</span>
</a>
</li>
<?php }
}
}
}
how i can find out the double assignation? seems very strange
Do you have somewhere a module with $smarty->assign(‘link’, ´coco’);
Do you have somewhere a module with $smarty->assign(‘link’, ´coco’);
nope i've checked :(
Could you comment this line: https://github.com/202-ecommerce/stripe_official/blob/develop/stripe_official.php#L1036
And tell send me the back-trace of the error.
oh no... this assignation is in getContent() of the backoffice configuration page.
this is in this front controller > https://github.com/202-ecommerce/stripe_official/blob/develop/controllers/front/stripeCards.php Could you please try to add this piece of code at line 33 (or 53) ?
$this->context->smarty->assign([
'link' => new Link(),
]);
After years of hard work with Stripe connector for PrestaShop, 202 ecommerce will stop developping Stripe module on January 9th 2023. After this date, merchants will get support directly
After years of hard work with Stripe connector for PrestaShop, 202 ecommerce will stop developping Stripe module on January 9th 2023. After this date, merchants will get support directly
That means that Stripe release their official module?
this is in this front controller > https://github.com/202-ecommerce/stripe_official/blob/develop/controllers/front/stripeCards.php Could you please try to add this piece of code at line 33 (or 53) ?
$this->context->smarty->assign([ 'link' => new Link(), ]);
exactly where? because is not clear?
Line 51 you have an other assignation. Just before, it sould be great.
Stripe decided to stop the partnership with 202 ecommerce to manage the development and the support of this module. They choose an new partner to follow the development with probably new ambitions !
Line 51 you have an other assignation. Just before, it sould be great.
Stripe decided to stop the partnership with 202 ecommerce to manage the development and the support of this module. They choose an new partner to follow the development with probably new ambitions !
i'm really terrified abotu this idea, i had great results with your works and support was always very fast and right. We will see what we will get :(
returning on the code i will try do add there:
I will do a test to see if the error continue
We have the error_log_php full of errors like that:
Prestashop 1.7.8.7 PHP7.4 Theme Warehouse 4.5.5 Stripe Module v2.5.0
No chache activated only CCC parameters ON
this is the part of the code (line 26) that gave error:
Any help will be great :)