Updating templates gives errors.

Need help? Please give a detailed explanation of your problem.
Post Reply
Trannum3487
AllPro Expert
AllPro Expert
Posts: 91
meble kuchenne Mikołów Knurów Czechowice-Dziedzice
Joined: Mon Apr 19, 2021 8:27 am
Website: www.socialreachagency.com

Updating templates gives errors.

Post by Trannum3487 »

Greetings,

I am doing some amendments to the HTML code we have on templates like "Create Buyer", "Login Template", "Cart template" and so on.

I noticed whenever I save the template it shows the blank page on the front side (webpage). And when I come back to the template it shows some errors in the existing php code which is the default code from APWT for the successful purchasing process.

Example, I updated the "Create Buyer" template which leads to a blank page on the website. In order to debug the problem, I come back to the template and noticed

<tr>
<td><input type="email" name="email" id="email" class="form-control" value="<? print $ **PHP CODE IS NOT ALLOWED HERE {DMK-00-39}** ['email']; ?>"/></td>
</tr>
<tr>
<td>First Name</td>
</tr>
<tr>
<td><input type="text" name="first_name" id="firstname" class="form-control" value="<? print $ **PHP CODE IS NOT ALLOWED HERE {DMK-00-39}** ['first_name']; ?>"/></td>
</tr>


"<? print $ **PHP CODE IS NOT ALLOWED HERE {DMK-00-39}** ['email']; ?>"

In order to make pages work at least, I just commented this code like this. <? print // $ **PHP CODE IS NOT ALLOWED HERE {DMK-00-39}** ['email']; ?>
But that is not a solution, it will stop the process of APWT backed process and would cause inconvenience to the customers.

This is something that is crucial and needs to be fixed.

I have attached screenshots for reference.
Edit-Template-Streetcar-Takeover-.png
Edit-Template-Streetcar-Takeover-.png (119.06 KiB) Viewed 297 times
User avatar
Chopper326
AllPro Provider
AllPro Provider
Posts: 71
Joined: Thu Sep 09, 2021 11:37 am
Website: www.allprowebtools.com

Re: Updating templates gives errors.

Post by Chopper326 »

You can edit the code in each of the templates by going to Theme Editor > select your theme > click the "save" button first when you reach the theme code.

Then reload the page by pressing the enter key on the URL bar and you will see the following errors on the page:

value="<? print $ **PHP CODE IS NOT ALLOWED HERE {DMK-00-39}** ['first_name']; ?>"/></td>

You can change the line to look like this (replace everything from the question mark "?" to the end of the square bracket "]" with the value that was in the square brackets, not including the underscore character) :

value="<? print $apwtfirstname; ?>"/></td>
Other examples would be:
  • $apwtemail
  • $apwtlastname
  • $apwtphone
  • $apwtpassword
  • $apwtpassword2
  • $apwtcompany
  • $apwtaddress1
  • $apwtaddress2
  • $apwtcity
  • $apwtid


Please save the page again and see if there's error still.
Trannum3487
AllPro Expert
AllPro Expert
Posts: 91
Joined: Mon Apr 19, 2021 8:27 am
Website: www.socialreachagency.com

Re: Updating templates gives errors.

Post by Trannum3487 »

That Worked! How about the rest of the templates? If variable names have been changed for all templates, then can we have any doc where changes that need to be done should be mentioned?

I mean it should be mentioned somewhere so that we can follow instructions and change the templates accordingly.
Attachments
Edit-Template-Streetcar-Takeover- (1).png
Edit-Template-Streetcar-Takeover- (1).png (106.31 KiB) Viewed 262 times
Post Reply