Shortcodes

Phoca Cart - complex e-commerce extension
User avatar
Nidzo
Phoca Expert
Phoca Expert
Posts: 521
Joined: 07 Nov 2018, 14:55

Shortcodes

Post by Nidzo »

Phoca Cart 6.1.0 Beta12
I have set up two payment methods and adjusted the descriptions in Description (Info View) to use the {descriptioninfoview} short code to display them in the email sent to the customer.

I also have three short codes in Description (Info View): {totaltopay}, {invoicenumber} and {invoiceduedate} but they do not display the information when included in the {descriptioninfoview} short code.

Basically it is rendering the short code within the short code. Interestingly, the {bankaccountnumber} short code displays correctly in {descriptioninfoview}.

Is this some kind of error and is it possible to display the values ​​of {totaltopay}, {invoicenumber} and {invoiceduedate} in the {descriptioninfoview} short code to customize the email template?

Image
Payment description (Info View)

Image
Email template HTML Body
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49415
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Shortcodes

Post by Jan »

Hi, the info view has no connection to the order (to order ID) as the view can be displayed directly. When order is made, the cart and order is closed and the user is redirected to info view - such has no more information of previously made order - so no ID no information about user, no information about order or receipt id, etc. It only has common variables which can be displayed without connection to specific order.

There is exception, there is even for plugins which can get the info about the order id from session and display such information (this can be used e.g. for payment methods), but this is only valid for plugins, not for displaying variables in info view description (there the order is closed and no personal or order information is available)

Jan
If you find Phoca extensions useful, please support the project
User avatar
Nidzo
Phoca Expert
Phoca Expert
Posts: 521
Joined: 07 Nov 2018, 14:55

Re: Shortcodes

Post by Nidzo »

OK
User avatar
Nidzo
Phoca Expert
Phoca Expert
Posts: 521
Joined: 07 Nov 2018, 14:55

Re: Shortcodes

Post by Nidzo »

I need advice then.
How would you solve the case when we have two payment methods?
One is by card, and the other is payment via bank or QR code.
Since not everyone uses QR code, they need to have clear payment instructions such as the name of the recipient, account number, payment amount, payment reference.
This information is redundant if payment is made by card, but necessary for payment via bank or QR code.

I tried to do it through the description in the Description (Info View) of the payment method as in the screenshots from the first post. But you say that it is not possible.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49415
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Shortcodes

Post by Jan »

Hi, if you have QR payment, there are no information about the user, but about your data (bank, bank account number, etc.). Why you need to have customer data in QR code?
If you find Phoca extensions useful, please support the project
User avatar
Nidzo
Phoca Expert
Phoca Expert
Posts: 521
Joined: 07 Nov 2018, 14:55

Re: Shortcodes

Post by Nidzo »

I did workaround with {IF PAYMENTDESCRIPTIONINFO} tag in Email template.
In addition to QR codes, Serbia still uses a general payment slip that the payer must fill out manually. That's why I need these short codes ({totaltopay}, {invoicenumber} and {invoiceduedate}) to be visible as instructions.
Why you need to have customer data in QR code?
It was mandatory, but when I checked now, the National Bank of Serbia now marked that option as optional. Bank applications now fill those data automaticaly.
Now this topic is not actual anymore.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49415
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Shortcodes

Post by Jan »

Ok, thank you for the info.
If you find Phoca extensions useful, please support the project
Post Reply