Post by McYoda » Thu Feb 09, 2017 2:23 pm

Dear all
I'm completely lost. Have been searching forums, google, well more or less all the web for two hours now, but didn't find a solution.

What I want to do:
I want to create an Information Page, which is easy in fact. But: my HTML code includes a form and javascript. And that does not work. When I put the code in the editor (in code view mode!) and I click save, I get just a strange value ("0.35") shown on a blank page apart from that and the "save" never get back to the OpenCart backend.
After reloading the content I tried to save is completely lost.

Just for information: the form I like to put in that information page is a price calculator for scuba diving gases.

I've attached the zipped *.html file, since it is quite a long code to put it in code tags. If you open that html in a browser it works perfectly (apart from having a bad look without css ;-))

I hope somebody can guide me how to accomplish my goal to have this html file as an information page in OpenCart. I really need this stuff. So any help is highly appreciated.

I'm on OpenCart 2.3.0.2 using Journal Theme 2.

Thanks for any hints
Martin

Newbie

Posts

Joined
Thu Feb 09, 2017 2:06 pm

Post by paulfeakins » Thu Feb 09, 2017 7:11 pm

Hi Martin,

You probably don't want to try and paste all that in to the WYSIWYG editor.

You'd be better off creating a new template .tpl file, adding the code in there, then selecting your template for the page.

Cheers,
Paul

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Expert Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by IP_CAM » Fri Feb 10, 2017 12:52 am

well, wondering, I just downloaded a socalled 'clean category Page' extension, and inserted your html file
content, as it came, into it's catclean.tpl file. Then, I created a new category, called TEST, by use
of the Admin, using the Layout Override Clean Cat, and this is the 'very quick step' result of all this, it
does not even show an error somewhere, it even works in full, to my big surprise. :D
Extension used (in my OC v.1.5.6.5!)
https://www.opencart.com/index.php?rout ... n_id=18429
The Category is called TEST, visible in my Cat Sections.
Just to give you a hint. ;)
Ernie

http://www.evelo.li/shop/index.php?rout ... ry&path=62

I don't use the Forum Mailer, to reach me, contact: jti@jacob.ch
-
Demoversions:
OpenCart LIGHT v.1.5.6.5 http://www.bigmax.ch/
OpenCart V-PRO v.1.5.6.5 http://www.ebikes.li/shop/
-
1'700+ FREE OC Extensions - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
-
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by McYoda » Sun Feb 12, 2017 2:54 pm

Hi Paul
Thanks for this hint. Trying since 3 hours now reading google links like hell.
I got a template ready but I don't get the my content to work...
You don't happen to have some more hints?

Newbie

Posts

Joined
Thu Feb 09, 2017 2:06 pm

Post by McYoda » Sun Feb 12, 2017 2:55 pm

Hi IP_CAM
Nice idea. Wrote to the developer about v2.3.0.2 compatibility. We'll see....
Thanks for this.

Newbie

Posts

Joined
Thu Feb 09, 2017 2:06 pm

Post by pprmkr » Sun Feb 12, 2017 6:22 pm

Install attached file using Extensions - Installer
Refresh Modifications

Edit the Information page you want to display the calculation form .
Enter {GasRechner} there where you want to place the form.

Before and/or after {GasRechner} type your text ...

What does this modification do ?
- It searches for {GasRechner} in information - description
- It replaces the text {GasRechner} with $this->load->view('information/gasrechner');
- Content before and after {GasRechner} are placed before and after $this->load->view('information/gasrechner')

Attachments


User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by McYoda » Fri Feb 17, 2017 1:16 am

Thanks for all your support.
I managed it by installing CKEditor and just creating an information page.
CKEditor is way more powerful than this cheap Summernote thing.

Newbie

Posts

Joined
Thu Feb 09, 2017 2:06 pm

Post by hobbykit » Sat Jan 11, 2020 3:57 pm

Dear all,

I have a similar problem. I've been browsing the google for two days, but I can't find any information.
In my old site I had a calculator (for connecting resistors and capacitors, and some basic electrical laws) and everyone used it.
My HTML code includes a form.
I am now using OpenCart 2.0.1.1, and cannot use it.

Any help will be helpful to me.
Thank you for your time.

Georgi

Newbie

Posts

Joined
Sat Jan 11, 2020 3:50 pm
Location - Bulgaria

Post by pprmkr » Wed Jan 15, 2020 4:34 am

Download and install with Extension - Installer
Then Refresh modification

On any information page you can enter:

Code: Select all

{ECalculator}

This code will be replaced by the calculator.

See demo

Please report back ...

When helpfull : show apriciation

Attachments


User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by hobbykit » Wed Jan 15, 2020 9:47 pm

Thanks for the quick response and assistance.
I downloaded it, installed it. No problem about that.
But it stopped loading information pages (Information - About Us, Catalog, Partners and Distributors).
Maybe I confused something. I don't understand much. Sorry about that.
Can I place it in Categories?

Newbie

Posts

Joined
Sat Jan 11, 2020 3:50 pm
Location - Bulgaria

Post by pprmkr » Wed Jan 15, 2020 10:27 pm

Sorry. Modifications always added calculator.
Fixed : check presents of {ECalculator}

- Delete Exensions - Modifications - PprMkr Including Electronics calculator
- Download and reinstall attached archive.
- Refresh Modifications

Attachments


User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by hobbykit » Wed Jan 15, 2020 10:45 pm

I post it, but I get the error:

/public_html/vqmod/vqcache/vq2-system_modification_system_engine_loader.php on line 45

Can I place it in Categories, not on the information page?

Newbie

Posts

Joined
Sat Jan 11, 2020 3:50 pm
Location - Bulgaria

Post by pprmkr » Thu Jan 16, 2020 4:37 pm

Attached : Now possible to add to information page and category

See category demo ( language English only )
See information demo

Extensions - Modification: Delete 'PprMkr Including Electronics calculator'
Extensions - Extensie Installer: Install 'electronics_calculater.ocmod.zip'
Extensions - Modification: Refresh

User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by hobbykit » Thu Jan 16, 2020 5:48 pm

Thank you. Works perfectly.
I installed electronics_calculater_oc201.ocmod.zip
At the risk of me becoming insolent, to ask. Can there be two languages? English and Bulgarian?

Newbie

Posts

Joined
Sat Jan 11, 2020 3:50 pm
Location - Bulgaria

Post by pprmkr » Thu Jan 16, 2020 6:01 pm

Multilanguage. Just type {ECalculator} in each description field.

Note: Text on calculator will not be translated !
However: this can be done, but requires language files for each language and extra controller code.

User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by pprmkr » Thu Jan 16, 2020 11:20 pm

Uninstall previous.
Install latest.

You have to translate language files and copy to catalog/language/Your_Language/information folder yourself.

User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by hobbykit » Fri Jan 17, 2020 4:14 pm

Thank you so much !
I translated it. Works perfectly.
You're a great person !

Newbie

Posts

Joined
Sat Jan 11, 2020 3:50 pm
Location - Bulgaria
Who is online

Users browsing this forum: No registered users and 36 guests