Jump to content

Inserting php into a template page


adCCart22
 Share

Recommended Posts

Hello,

I am using version 6.4.4 which works perfectly with php 7.4 and
the original template.

I need to insert a php script in a page for example the contact page, that it
is the best solution to use without disturbing the original template.

Thanks for your help and suggestions.

Link to comment
Share on other sites

Welcome adCCart22! Glad to see you made it to the forums.

There are two things to get straight in what you are asking about:

1. Are you wanting the PHP script do the form's POSTed responses?
2. Are you hoping for the PHP script to populate the form exactly during the time the template rendering engine (Smarty) is compiling the template, under the control of Smarty?

Link to comment
Share on other sites

Thanks Bsmither for the speed of your response !

I'll give you an example : include a script that replaces Recaptcha with a classic captcha
in php.

Insertion in the content.contact.php file of an include to a file that will display the
result and will allow the validation of the form.

Apologies for my average English. I hope I have presented the request as well as possible.

Thanks in advance.

Link to comment
Share on other sites

Ok, so the above is an example, but it's not the actual project that needs a solution.

So, from the example, it seems you need to populate a template with custom HTML and possibly process any POSTed data returned.

CubeCart has a "hooks" system, which is useful to do these kinds of things. Unfortunately, one needs to understand where the hooks are individually placed in the core code, so that these kinds of customizations can be implemented.

If you wish to discuss specifics in private, send me a PM.

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...