Show Posts


Topics - teppyogi

Pages: [1]
1
Hi again,

I wish to include, outside of the AbanteCart architecture, a php file which can provide information based on the customer_id, if one is logged in. I have found online that many extensions use the following call:
Quote
$this->session->data['customer_id']

However, this seems to be for certain components which inherit some class from the core, I imagine. What I would like to know is the simplest way to simply be able to retrieve that information without going through a formal "extension" or "plugin".

In other words: I would like to add a file test.php at the root of the domain which can retrieve the customer_id.

Is this possible or is a formal development of an extension the only way? Thanks !

Tepp

2
General Support / Email validation seems too restrictive vs RFC?
« on: May 05, 2021, 07:05:53 PM »
Hello,

I have tried to register into AbanteCart for testing purposes using myAddress+test1@gmail.com but got a validation error. Looking up validation rules, I stumbled on this post, in which a core developer mentions that the validation regexp is:
Quote
define('EMAIL_REGEX_PATTERN','/^[A-Z0-9._%-]+@[A-Z0-9.-]{0,61}[A-Z0-9]\.[A-Z]{2,16}$/i');

This would explain why I get a validation error, but I am surprised the validation is not done with respect to the RFC, which you can look up on Wikipedia at the Email_address entry (I cannot post the link)...

Argument: the case for avoiding such addresses can be made since, in fact, it bypasses the 1 account per person rule. However, allowing such cases for testing purposes seems worthwhile. Also, validation imho should be just that: making sure the field has been validly populated. I regularly pest at websites which forbid me to use + in addresses because it is super practical for email classification. Therefore I would like it if my website were to avoid being in this category :-)

Questions: am I missing a setting anywhere? If not, should this become a feature in a future version? and in the meantime, how can I provide my own validation regexp?

Thanks! Tepp.

Pages: [1]

Powered by SMFPacks Social Login Mod