hummer
September 2, 2020, 12:00am
#1
Hi!
I'm new to CS-Cart, please understand and be patient with my questions. Thank you: :-)
If I have my own PHP page in the CS-Cart directory, how can I access the CS-Cart environment (variables, sessions, functions, etc.)? Which includes etc. are necessary?
I am happy about every answer!
Best regards
hummer
hummer
September 2, 2020, 12:00am
#3
You made my day, eComLabs! Thanks so much for your support.
I know I'm opening a lot of topics right now. But you can be sure that I'll only do that after I haven't found an answer in the doc or forum.
I still have one question in this regard: how to get the settings made in local_conf.php (or config.local.php), e.g.:
$config['https_host']
Is there a way to access these configuration parameters?
Looking forword to your answer.
Best regards
hummer
You made my day, eComLabs! Thanks so much for your support.
I know I'm opening a lot of topics right now. But you can be sure that I'll only do that after I haven't found an answer in the doc or forum.
I still have one question in this regard: how to get the settings made in local_conf.php (or config.local.php), e.g.:
$config['https_host']
Is there a way to access these configuration parameters?
Looking forword to your answer.
Best regards
hummer
Sure, use
Registry::get('config.https_host');
hummer
September 3, 2020, 12:00am
#5
Thank you very much, eComLabs! Works like a charm. :grin:
hummer
September 14, 2020, 12:00am
#7
Hello!
I have a further question regarding this topic (using the CS-Cart environment):
How to enable jQuery on my self-scripted PHP page? Which include is necessary?
I would like to avoid having to integrate jQuery myself. Instead, there is certainly already a default include by CS Cart, isn't it?
Looking forward to your answer!
Best regards
hummer
If you display any smarty template, use the following code there
{include file="common/scripts.tpl"}
It will include all CS-Cart js
hummer
September 14, 2020, 12:00am
#9
Sorry I wasn't specific enough. It is a separate PHP page without any smarty usage.
I want to avoid stating these lines of code within my "own" PHP page:
How to include jQuery on a smarter way?
ecomlabs
September 15, 2020, 12:00am
#10
For example, you can use
echo '';
CS-Cart does not have specific functions for this