Attribute text (64), problem when I checkout

Phoca Cart - complex e-commerce extension
nscom
Phoca Member
Phoca Member
Posts: 26
Joined: 22 Oct 2021, 12:02

Attribute text (64), problem when I checkout

Post by nscom »

I have a little problem when I checkout, I have a text attribute (not mandatory) in option at 3€, if I don't fill this free field a message is displayed (Error Order not executed. The product ordered is not available or the required attribute option has not been selected) at the time of payment. Do you have a tip?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Attribute text (64), problem when I checkout

Post by Jan »

Hi, try to download this file:

https://www.phoca.cz/forumfiles/attribute.zip

and unzip it to folder:
administrator\components\com_phocacart\libraries\phocacart\attribute\

(so the attribute.php will be overwritten)

and let me know if this helped.

Thank you, Jan
If you find Phoca extensions useful, please support the project
nscom
Phoca Member
Phoca Member
Posts: 26
Joined: 22 Oct 2021, 12:02

Re: Attribute text (64), problem when I checkout

Post by nscom »

Hello,
Excellent merci Jan, cela fonctionne.
Excellent thanks Jan, it works.
A question in relation, is it possible to display on the invoice sent by mail, that it displays what the customer has entered in the text box in question?
Good day to you
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Attribute text (64), problem when I checkout

Post by Jan »

Hi, see similar posts, this can be done only per template override. The code is there but needs to be uncommented.

See the code below:

Code: Select all

/* Should we display the values of attributes added by users in order/delivery note/receipt/invoice?
in:
components/com_phocacart/layouts/order.php

Mostly, in such fields, personal information is added which does not belong to official public documents like invoice is.

Jan
If you find Phoca extensions useful, please support the project
nscom
Phoca Member
Phoca Member
Posts: 26
Joined: 22 Oct 2021, 12:02

Re: Attribute text (64), problem when I checkout

Post by nscom »

Hello Jan, Thank you for your reply. What do you mean by uncommented? I deleted the sentence / * Should we display the values of attributes added by users in order / delivery note / receipt / invoice? but it displays an error when validating my order.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Attribute text (64), problem when I checkout

Post by Jan »

Hi, no, you should not delete the sentence, but uncomment the PHP code (this PHP code is ready for such purpose but is commented as default, it should be uncomment - this is a PHP code, so if there is some error, like not fully uncommented code or similar, it throws PHP error - so when uncommenting, the PHP code sould be checked if it is correctly written)

Jan
If you find Phoca extensions useful, please support the project
nscom
Phoca Member
Phoca Member
Posts: 26
Joined: 22 Oct 2021, 12:02

Re: Attribute text (64), problem when I checkout

Post by nscom »

Hello,
Thank you Jan for your precision it works.
However, it is displayed twice, see screenshot. Is it possible to display only the lines marked in green?

https://imgur.com/a/zcinHUN
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Attribute text (64), problem when I checkout

Post by Jan »

Hi, then you need to customize the code and comment the part for title or for value, depends on your parameter types if title or value.


$v2->attribute_title
$v2->option_title
$v2->option_value

Jan
If you find Phoca extensions useful, please support the project
nscom
Phoca Member
Phoca Member
Posts: 26
Joined: 22 Oct 2021, 12:02

Re: Attribute text (64), problem when I checkout

Post by nscom »

Hello Jan,
Thank you for your answer, I will test it
Have a nice day
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Attribute text (64), problem when I checkout

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Post Reply