Hi OC-community,
I have some products which are just shipped at certain times. To give customers more information on this I'd like to put a link in the product description that shows some FAQs in a pop-up window. I want the pop-up to be exactly like the terms & conditions box, so no header & footer, but just the text on the information page in a box. Does anyone have an idea how this could be achieved?
Thanks & best,
Torge
I have some products which are just shipped at certain times. To give customers more information on this I'd like to put a link in the product description that shows some FAQs in a pop-up window. I want the pop-up to be exactly like the terms & conditions box, so no header & footer, but just the text on the information page in a box. Does anyone have an idea how this could be achieved?
Thanks & best,
Torge
in description editor in code view add
<a href="http://demo.opencart.com/index.php?rout ... ation_id=3" class="agree"><b> You Content </b></a>
with href is information you need to show
<a href="http://demo.opencart.com/index.php?rout ... ation_id=3" class="agree"><b> You Content </b></a>
with href is information you need to show
News CMS || Plus SEO || Live Price change with Option Select
Hej jimmyphong,
I tried that already and it doesn't work unfortunately. See: https://www.diestadtgaertner.de/pflanzen/erdbeerminze. Just retried to make sure but still no luck. Any further ideas?
Thanks & best,
Torge
I tried that already and it doesn't work unfortunately. See: https://www.diestadtgaertner.de/pflanzen/erdbeerminze. Just retried to make sure but still no luck. Any further ideas?
Thanks & best,
Torge
Hello,
You will need to follow the following steps in order to display your text/description in a pop-up (modal) without header and footer.
1. You will need to insert your description in the Admin Panel, in the information section.
2. You will need to modify the Information Controller in order to display the description only without header and footer. Open the file /catalog/information/information.php
3. Look for the following code in the index method:
4. Replace the code by this one:
5. Copy the following code in your JavaScript file:
N.B: You will need to replace the X by the information_id obtained from the Admin Panel while you created a new page with your FAQ description.
6.Finally, add a link in your product description. You will find an example below:
Hope it helps.
Best Regards,
OpenTeam
You will need to follow the following steps in order to display your text/description in a pop-up (modal) without header and footer.
1. You will need to insert your description in the Admin Panel, in the information section.
2. You will need to modify the Information Controller in order to display the description only without header and footer. Open the file /catalog/information/information.php
3. Look for the following code in the index method:
Code: Select all
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/information/information.tpl')) {
$this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/information/information.tpl', $data));
} else {
$this->response->setOutput($this->load->view('default/template/information/information.tpl', $data));
}
Code: Select all
if (isset($this->request->get['type']) && $this->request->get['type']=="textonly") {
$this->response->setOutput($data['description']);
} else {
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/information/information.tpl')) {
$this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/information/information.tpl', $data));
} else {
$this->response->setOutput($this->load->view('default/template/information/information.tpl', $data));
}
}
Code: Select all
$(document).ready(function() {
$('#faq-modal').click(function(){
var $linkdata = $(this);
var $dialog = $('<div></div>')
.load('/index.php?route=information/information&information_id=X&type=textonly')
.dialog({
autoOpen: false,
title: $linkdata.attr('title'),
width: 600
});
$dialog.dialog('open');
return false;
});
});
6.Finally, add a link in your product description. You will find an example below:
Code: Select all
<a href="javascript:void(0)" id="faq-modal" title="My FAQ Title">MY FAQ TEXT IN THE DESCRIPTION</a>
Best Regards,
OpenTeam
Hi,
I've added the code provided by OpenTeam to my last step of the checkout process (confirm.tpl)
However, no pop-up is opening.
I'm having a multistore site where I need to display information for the German Shop only. My code in the confirm.tpl is as follows. Not sure where to place the JS-Snippet.
I've also changed the code the information.php File.
Any clue what I'm doing wrong here?
Many thanks, Chris
I've added the code provided by OpenTeam to my last step of the checkout process (confirm.tpl)
However, no pop-up is opening.
I'm having a multistore site where I need to display information for the German Shop only. My code in the confirm.tpl is as follows. Not sure where to place the JS-Snippet.
Code: Select all
<?php
$url = "//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";
if (strpos($url,'.de') !== false) { ?>
<a href="javascript:void(0)" id="faq-modal" title="Wiederrufsrecht"><?php echo $text_returner; ?></a>
<?php } ?>
<script>
$(document).ready(function() {
$('#faq-modal').click(function(){
var $linkdata = $(this);
var $dialog = $('<div></div>')
.load('/index.php?route=information/information&information_id=4&type=textonly')
.dialog({
autoOpen: false,
title: $linkdata.attr('title'),
width: 600
});
$dialog.dialog('open');
return false;
});
});
</script>
Any clue what I'm doing wrong here?
Many thanks, Chris
Hi,
maybe you are looking something like this: https://www.opencart.com/index.php?rout ... =SmartTech
Cheers
Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here
Thank you for your reply - the code i had just went in there and didn't have any extensions to add - i dont have any ftp or install section to my site as set up by someone else who has since closed - i am really thinking of just closing it all as its getting me down
my site works - www.justsimplyblanks.co.uk
cheers
mel
my site works - www.justsimplyblanks.co.uk
cheers
mel
Never give up...smellyjsb wrote: ↑Fri Mar 30, 2018 6:56 pmThank you for your reply - the code i had just went in there and didn't have any extensions to add - i dont have any ftp or install section to my site as set up by someone else who has since closed - i am really thinking of just closing it all as its getting me down
my site works - www.justsimplyblanks.co.uk
cheers
mel

Cheers
Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here
The company that built my site is closed
i have a hosting company but no idea what i am doing - the pop up box i had was just text pop into script of some sort that went into the welcome - add module box via admin. I only have admin access to site - nothing on my pc re opencart at all.
I think i might be better off changing the whole site for something easier to use

I think i might be better off changing the whole site for something easier to use

You can find another company which can help to renew your site. From another hand Opencart is very simple for admin. So you can learn little bit and do not change to another platform. With another platform also will be similar difficulties...smellyjsb wrote: ↑Fri Mar 30, 2018 10:15 pmThe company that built my site is closedi have a hosting company but no idea what i am doing - the pop up box i had was just text pop into script of some sort that went into the welcome - add module box via admin. I only have admin access to site - nothing on my pc re opencart at all.
I think i might be better off changing the whole site for something easier to use![]()
Cheers
Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here
Who is online
Users browsing this forum: No registered users and 40 guests