Post by VP-GREECE » Thu Jul 22, 2021 4:31 am

Hello,
I need help adding a script to an information page. How do I do that?
Thank you.

Newbie

Posts

Joined
Tue Jul 20, 2021 2:02 am

Post by fegdeed » Thu Jul 22, 2021 7:28 am

What kinda script are you referring to?

Image
Get a secure, fast, and reliable web hosting service from https://turnuphosting.com.


Active Member

Posts

Joined
Fri Sep 21, 2018 12:01 am

Post by VP-GREECE » Thu Jul 22, 2021 3:04 pm

Thank you for replying. I want to add the following js script:

<script id="CookieDeclaration" src="https://consent.cookiebot.com/3c68fbe1- ... 0670/cd.js" type="text/javascript" async></script>

Newbie

Posts

Joined
Tue Jul 20, 2021 2:02 am

User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by VP-GREECE » Thu Jul 22, 2021 4:24 pm

I have already done that.
What I want is to add the cookie declaration text which is the script that enables users to withdraw and modify their consent. I want to add it to a dedicated page in opencart so I creation a Cookie Policy information page. We cannot add scripts to the information pages via the editor so how can I go about doing that?

Thank you

Newbie

Posts

Joined
Tue Jul 20, 2021 2:02 am

Post by straightlight » Thu Jul 22, 2021 5:27 pm

VP-GREECE wrote:
Thu Jul 22, 2021 4:24 pm
I have already done that.
What I want is to add the cookie declaration text which is the script that enables users to withdraw and modify their consent. I want to add it to a dedicated page in opencart so I creation a Cookie Policy information page. We cannot add scripts to the information pages via the editor so how can I go about doing that?

Thank you
OC version. Instead of a dedicated page, I would suggest the use of a modal version as an extension that can be downloaded from the Marketplace which handles GDPR or CCPA (still on-hold for CCRA).

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by paulfeakins » Thu Jul 22, 2021 5:43 pm

VP-GREECE wrote:
Thu Jul 22, 2021 4:24 pm
What I want is to add the cookie declaration text
I really wouldn't bother with that EU rubbish.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by VP-GREECE » Thu Jul 22, 2021 7:38 pm

straightlight wrote:
Thu Jul 22, 2021 5:27 pm
VP-GREECE wrote:
Thu Jul 22, 2021 4:24 pm
I have already done that.
What I want is to add the cookie declaration text which is the script that enables users to withdraw and modify their consent. I want to add it to a dedicated page in opencart so I creation a Cookie Policy information page. We cannot add scripts to the information pages via the editor so how can I go about doing that?

Thank you
OC version. Instead of a dedicated page, I would suggest the use of a modal version as an extension that can be downloaded from the Marketplace which handles GDPR or CCPA (still on-hold for CCRA).
Thank you for your suggestion. Most of the good quality modules are not free of charge so I would really like to add this cookiebot declaration to a dedicated page (information page if possible). Is it something overly complicated?

Newbie

Posts

Joined
Tue Jul 20, 2021 2:02 am

Post by straightlight » Thu Jul 22, 2021 7:54 pm

VP-GREECE wrote:
Thu Jul 22, 2021 7:38 pm
straightlight wrote:
Thu Jul 22, 2021 5:27 pm
VP-GREECE wrote:
Thu Jul 22, 2021 4:24 pm
I have already done that.
What I want is to add the cookie declaration text which is the script that enables users to withdraw and modify their consent. I want to add it to a dedicated page in opencart so I creation a Cookie Policy information page. We cannot add scripts to the information pages via the editor so how can I go about doing that?

Thank you
OC version. Instead of a dedicated page, I would suggest the use of a modal version as an extension that can be downloaded from the Marketplace which handles GDPR or CCPA (still on-hold for CCRA).
Thank you for your suggestion. Most of the good quality modules are not free of charge so I would really like to add this cookiebot declaration to a dedicated page (information page if possible). Is it something overly complicated?
If you are looking for free solutions, then Google search would be your best friend. Otherwise, you'd need to create a new service request in the Commercial Support section of the forum to get this done as a custom job.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by VP-GREECE » Thu Jul 22, 2021 8:10 pm

Thank you

Newbie

Posts

Joined
Tue Jul 20, 2021 2:02 am

Post by ADD Creative » Fri Jul 23, 2021 8:07 am

VP-GREECE wrote:
Thu Jul 22, 2021 7:38 pm
Thank you for your suggestion. Most of the good quality modules are not free of charge so I would really like to add this cookiebot declaration to a dedicated page (information page if possible). Is it something overly complicated?
If your script doesn't need to be in the head. You can add scripts to the information pages in the Description box editor. Click on the code view </> button. Add your script. Now switch off the code view by clicking the </> button again. This is because of a bug, where saving in code view will not work. Also, due to another bug the script will execute in the admin when switching off code view. So only enter trusted scripts here. Once back in normal view, save.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by fegdeed » Fri Jul 23, 2021 1:06 pm

There are some free cookie related extensions on the marketplace, check this link https://www.opencart.com/index.php?rout ... rch=cookie.

Image
Get a secure, fast, and reliable web hosting service from https://turnuphosting.com.


Active Member

Posts

Joined
Fri Sep 21, 2018 12:01 am

Post by ADD Creative » Fri Jul 23, 2021 4:23 pm

ADD Creative wrote:
Fri Jul 23, 2021 8:07 am
VP-GREECE wrote:
Thu Jul 22, 2021 7:38 pm
Thank you for your suggestion. Most of the good quality modules are not free of charge so I would really like to add this cookiebot declaration to a dedicated page (information page if possible). Is it something overly complicated?
If your script doesn't need to be in the head. You can add scripts to the information pages in the Description box editor. Click on the code view </> button. Add your script. Now switch off the code view by clicking the </> button again. This is because of a bug, where saving in code view will not work. Also, due to another bug the script will execute in the admin when switching off code view. So only enter trusted scripts here. Once back in normal view, save.
If switching out of code view to save causes problems, due to the script running, there is a workaround so you can save without switching out of code view.
viewtopic.php?f=201&t=213287#p763240

But it won't stop the script being run next time you edit that page.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by VP-GREECE » Mon Jul 26, 2021 10:53 pm

It worked. Thank you so much. :) I thought it wasn't possible to save the script code at all. It was this simple and I had been googling for countless hours trying to find a solution.

Newbie

Posts

Joined
Tue Jul 20, 2021 2:02 am

Post by straightlight » Tue Jul 27, 2021 12:08 am

Now that the issue has been solved, please add: [SOLVED] at the beginning of the subject line on your first post.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: Semrush [Bot] and 94 guests