"Feedback" and "Ask a question" do not work.

Phoca Cart - complex e-commerce extension
kosh2323
Phoca Member
Phoca Member
Posts: 22
Joined: 13 Sep 2022, 08:03

Re: "Feedback" and "Ask a question" do not work.

Post by kosh2323 »

Jan wrote: 19 Sep 2022, 17:03 Hi, thank you for the info:

1) will be fixed in next version

2) publish/unpublish will be removed as it has no function there

3) yes, for now there is no specific verification for the phone, it is just text field (because of setting problematic rules - e.g. for each country, etc.)

Thank you, Jan
Thanks for the answers Jan.

3) Still, is it possible to enter a field in the settings for checking the phone, in which you can enter characters for checking yourself, for example, if you enter numbers in the field in the settings, then, accordingly, the check of filling in or sending will be checked only for numbers. It seems to me that sooner or later it will have to be done. Wait Beta8.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: "Feedback" and "Ask a question" do not work.

Post by Jan »

Hi, 3) for now there is no such option so this needs to be set here:

components/com_phocacart/models/forms/question.xml

The problematic part is, it is an XML file, so there you cannot use options to set different valid rules.

Jan
If you find Phoca extensions useful, please support the project
kosh2323
Phoca Member
Phoca Member
Posts: 22
Joined: 13 Sep 2022, 08:03

Re: "Feedback" and "Ask a question" do not work.

Post by kosh2323 »

Jan wrote: 19 Sep 2022, 19:30 Hi, 3) for now there is no such option so this needs to be set here:

components/com_phocacart/models/forms/question.xml

The problematic part is, it is an XML file, so there you cannot use options to set different valid rules.

Jan
Hi, Jan. Do you mean that here

Line 17-19
3) <field name="phone_mobile" type="text" class="form-control" size="40" label="COM_PHOCACART_FIELD_F_MOBILE_PHONE_LABEL" description="COM_PHOCACART_FIELD_F_MOBILE_PHONE_DESC" filter="string" />

instead filter="string"

we put filter="integer"

this is just the type of field as I understand it

or validate how to prescribe?

------------------------

By the way, look at one of the solutions that was advised about

Deprecated: Function strftime() is deprecated in ....\libraries\src\Form\Field\CalendarField.php

https://github.com/joomla/joomla-cms/issues/38276

What do you say?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: "Feedback" and "Ask a question" do not work.

Post by Jan »

What do you say?
The solution cannot be modified, this needs to be done by Joomla core developers. :idea:
If you find Phoca extensions useful, please support the project
kosh2323
Phoca Member
Phoca Member
Posts: 22
Joined: 13 Sep 2022, 08:03

Re: "Feedback" and "Ask a question" do not work.

Post by kosh2323 »

Yes, I realized that it's better for no one to get into the code, except for developers, no matter what hacks someone came up with.

Regarding checking the field for "phone", if I think correctly, I will have to create a *.php file to check, and the file itself question.xml
is it difficult to redirect to this file, just as you have implemented with verification, for example, e-mail validate="phocacartemail"? Is it difficult?

---------------------------------
In the new stable 4.0.5, these warnings are no longer there, thanks Jan.
1. When uploading images for a category, if you create a separate folder, then a folder is created, but once you go to it to upload images, it pops up

Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in \administrator\components\com_phocacart\libraries\phocacart\text\text.php on line 426

When creating a folder for product images, the same thing happens, a folder is created, but when you go to it, the same warning is exactly the same
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: "Feedback" and "Ask a question" do not work.

Post by Jan »

Hi, if you add some validate rule and the specific php rule will exist and will be located in right folder, then it should work OK. :idea:

Jan
If you find Phoca extensions useful, please support the project
kosh2323
Phoca Member
Phoca Member
Posts: 22
Joined: 13 Sep 2022, 08:03

Re: "Feedback" and "Ask a question" do not work.

Post by kosh2323 »

Jan wrote: 20 Sep 2022, 22:20 Hi, if you add some validate rule and the specific php rule will exist and will be located in right folder, then it should work OK. :idea:

Jan
Hi Jan. This is the prerogative of the developer, sooner or later, you will be asked about it, I am not a programmer, and I reason from the point of view of the user and convenience. There is just an e-mail field and it is checked for validation, there is a phone field and it is not checked, hence the questions.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: "Feedback" and "Ask a question" do not work.

Post by Jan »

Hi, yes, of course, but there are feature which can be done in core and there are some feature which maybe should be done as modifications or plugins, etc. based on natinal rules. Because it is not possible to cover with such rule all world countries format, such maybe should be done based on national conditions :idea: (this is similar to payment methods, where it is really hard to implement some payment method into core, which only work for one specific country :idea: )

Jan
If you find Phoca extensions useful, please support the project
kosh2323
Phoca Member
Phoca Member
Posts: 22
Joined: 13 Sep 2022, 08:03

Re: "Feedback" and "Ask a question" do not work.

Post by kosh2323 »

Jan wrote: 26 Sep 2022, 20:31 Hi, yes, of course, but there are feature which can be done in core and there are some feature which maybe should be done as modifications or plugins, etc. based on natinal rules. Because it is not possible to cover with such rule all world countries format, such maybe should be done based on national conditions :idea: (this is similar to payment methods, where it is really hard to implement some payment method into core, which only work for one specific country :idea: )

Jan
Hi Jan. There is a field, "Pattern" for entering regular expressions, I tried to enter so that only numbers are checked, but for some reason it does not work and the check does not occur. But when registering, this "Phone" field is checked for entering numbers. Why not enter a pattern to make it work, then everyone will be able to enter their own unique data for verification, for their country.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: "Feedback" and "Ask a question" do not work.

Post by Jan »

I am looking now on it. BTW when you add the "tel" as validate, then the field becomes "tel" instead of "text:

Image

Code: Select all

<input type="tel" inputmode="tel" name="jform[phone_1]" class="form-control validate-tel" id="jform_phone_1" value="" aria-describedby="jform_phone_1-desc">
But it looks like Jooml Form class does not transform the pattern into form field. :idea:

When the field is "text", it displays the pattern but when the field in "tel" it does not display the pattern, I will try to ask Joomla core developers

Joomla add pattern when the input field name is text:

Code: Select all

<input type="text" name="jform[phone_1]" id="jform_phone_1" value="" class="form-control" aria-describedby="jform_phone_1-desc" maxlength="20" pattern="[0-9]{3}-[0-9]{3}-[0-9]{4}">
Joomla does not add the pattern when the input field name is tel

Code: Select all

<input type="tel" inputmode="tel" name="jform[phone_1]" class="form-control validate-tel" id="jform_phone_1" value="" aria-describedby="jform_phone_1-desc">
Jan
If you find Phoca extensions useful, please support the project
Post Reply