Post by ianhaney » Wed Aug 01, 2018 10:23 pm

I have been asked by a client if a quote form can be added to a specific information page, is there a extension I can use or can I use a php form and add it to the source code of the specific information page or is it best to create a custom page with the form on it?

The site uses o/c 2.0.3.1

UPDATE: I have created a custom page and works all ok, how do I add that custom page to the admin side so the user can add content to the page above the form

Thank you in advance

Active Member

Posts

Joined
Sun Jun 24, 2012 2:30 am

Post by straightlight » Wed Aug 01, 2018 10:59 pm

UPDATE: I have created a custom page and works all ok, how do I add that custom page to the admin side so the user can add content to the page above the form
With the use of an API, this would be ideal. However, your OC version seem to be too old for this functionality. An upgrade may be required. As an alternative, to find an extension on the Marketplace to accomplish this. Otherwise, to get this done as a custom job from the Commercial Support section of the forum.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com contractor officials representative


Legendary Member

Posts

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

Post by DigitCart » Thu Aug 02, 2018 12:40 am

I have created a custom page and works all ok, how do I add that custom page to the admin side so the user can add content to the page above the form
You can merge your custom page with information.php, something like this:
information/information.php:

Code: Select all

if ($information_id == 100) {
	$data['my_content'] = $this->load->controller('path/to/my_custom_page.php');
} else {
	$data['my_content'] = '';
}
And in information/information.tpl, add after <?php echo $description; ?>:

Code: Select all

<?php if ($my_content) { ?>
	<?php echo $my_content; ?>
<?php } ?>

My Extensions / DigitCart


User avatar
Active Member

Posts

Joined
Thu Jun 22, 2017 5:32 pm


Post by ianhaney » Thu Aug 02, 2018 1:10 am

I copied the contact files for the new page as it would have the form on it, would adding the code you suggested and merging with the information php pages work as I copied the contact files from controller/language and template folders and renamed the new files?

I can paste the coding for three files if need to

Active Member

Posts

Joined
Sun Jun 24, 2012 2:30 am
Who is online

Users browsing this forum: Baidu [Spider] and 6 guests