Jump to content

"My shop" instead of the real name of the site on order-confirmation page


ricamaria

Recommended Posts

Hi all,

This is my first post on this forum, hope i'm doing it right.

I do not have a lot of experience programming php, so i am having trouble finding the problem, and maybe a solution.

I am setting up a new Dutch webshop and currently am testing the order process. Lots of things are going right, but i did find one silly bug in my installation.
I am using the classic template with PrestaShop-version: 1.7.5.2, with all modules updated
I am testing with Dutch language settings, but the same problem also occurs when using  the English language. 
I am testing with only one payment option enabled: payment by bank deposit.  (payment by check is disabled and not configured)
I have tested before and after clearing the cache, and with cache on and off.

The page in question is order-confirmation.
There in the section with id "content-hook_payment_return" I see a text "Uw bestelling op My shop is compleet." or in English" :Your order on My shop is complete". The bug is that "My shop" should have been substituted by the real shop name, as informed on the contacts page in the admin module, afaik. 

I have tried to debug, and get to themes\classic\templates\checkout where in the code a $HOOK_PAYMENT_RETURN is, which i think refers to a generic module (actually there are 2 modules that have a payment_return template).
In the directory /modules/ps_wirepayment/views/templates/hook  i find the payment_return template that has the line with the problem  ( i know this is the right template by adding some extra text in it).

the code:
{l s='Your order on %s is complete.' sprintf=[$shop_name] d='Modules.Wirepayment.Shop'}<br/> that generates the wrong (default?) shopname.

Ofcourse i can hardcode the name in this code as a workaround, but why does the real name not get loaded in the $shop_name variable?

In ps_wirepayment.php i see a line of code 'shop_name' => $this->context->shop->name which is in an if statement but if that is the right code to look at is already a bit above my current php skills.

 

Interesting maybe related fact is that a German user has the same kind of problem in the emails showing "My shop" instead of the real name, while my emails get the name of the site in the subjectline :  https://www.prestashop.com/forums/topic/996203-my-shop-anzeige-in-e-mail/?tab=comments#comment-3135185

Hope this is enough info! If not please don't hesitate to ask for more details.

Thanks,

Allard

Link to comment
Share on other sites

  • 1 month later...

Hi, 

My site is almost ready, and am sending testmails and have the same "My shop" in the confirmation mail. After digging in the database, I found the table pr_shop, with in the name field "My shop".

In the table pr_configuration, i see the field PS_SHOP_NAME which is set to the correct name.

So i think prestashop is reading the name of the shop from 2 places? And only one is updated?

Does this extra information make sense to anyone?

Thanks,

Allard

Link to comment
Share on other sites

  • 9 months later...
  • 1 year later...

I have similar problem, translation is fine and i check the where this variable is defined and i go to file SHOP/module/ps_wirepayment/views/templates/hook/payment_return.tpl and in the line 22

{l s='Your order on %s is complete.' sprintf=[$shop_name] d='Modules.Wirepayment.Shop'}<br/>

i change $shop_name to this $shop.name and it's working check maybe i help someone

  • Like 1
Link to comment
Share on other sites

  • 6 months later...
On 1/10/2022 at 8:34 PM, sieczken said:

I have similar problem, translation is fine and i check the where this variable is defined and i go to file SHOP/module/ps_wirepayment/views/templates/hook/payment_return.tpl and in the line 22

{l s='Your order on %s is complete.' sprintf=[$shop_name] d='Modules.Wirepayment.Shop'}<br/>

i change $shop_name to this $shop.name and it's working check maybe i help someone

THANKS. It helped me a lot. 

Link to comment
Share on other sites

On 1/10/2022 at 11:04 PM, sieczken said:

I have similar problem, translation is fine and i check the where this variable is defined and i go to file SHOP/module/ps_wirepayment/views/templates/hook/payment_return.tpl and in the line 22

{l s='Your order on %s is complete.' sprintf=[$shop_name] d='Modules.Wirepayment.Shop'}<br/>

i change $shop_name to this $shop.name and it's working check maybe i help someone

Thank you for sharing with community

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...