Undefined variable: text_faq in /home/cleo/public_html/catalog/view/theme/sport/template/module/information.tpl on line 8
Can you tell me what the problem is and what I need to change please?
tks
Cleo
Opencart v1.5.4.1 fr/en
Theme: Custom
vqmod-2.6.0
PHP: 7.3 (ea-php73)
In "catalog/language/english/module/information.php", add the following:
Code: Select all
$_['text_faq'] = 'FAQs';
In "catalog/controller/module/information.php", insert the following:
Code: Select all
$this->data['text_faq'] = $this->language->get('text_faq');
$this->data['faq'] = HTTP_SERVER . 'index.php?route=information/faq';
Code: Select all
<li><a href="<?php echo str_replace('&', '&', $faq); ?>"><?php echo $text_faq; ?></a></li>
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Ok I did as you suggest, in my (catalog/view/theme/YOUR_THEME/template/module/information.tpl) I had the following
<?php } ?>
<li><a href="<?php echo $faq; ?>"><?php echo $text_faq; ?></a></li>
Should I leave it there or remove it to add what you wrote?
Cause I tried just adding your's or deleting the one above and now I have the following showing:
Notice: Undefined variable: text_faq in /home/cleo/public_html/catalog/view/theme/sport/template/module/information.tpl on line 8
Notice: Undefined variable: text_faq in /home/cleo/public_html/catalog/view/theme/sport/template/module/information.tpl on line 9
I'm really lost now LoL!
Opencart v1.5.4.1 fr/en
Theme: Custom
vqmod-2.6.0
PHP: 7.3 (ea-php73)
Code: Select all
<div class="box">
<div class="top"><img src="catalog/view/theme/default/image/information.png" alt="" /><?php echo $heading_title; ?></div>
<div id="information" class="middle">
<ul>
<?php foreach ($informations as $information) { ?>
<li><a href="<?php echo str_replace('&', '&', $information['href']); ?>"><?php echo $information['title']; ?></a></li>
<?php } ?>
<li><a href="<?php echo str_replace('&', '&', $faq); ?>"><?php echo $text_faq; ?></a></li>
<li><a href="<?php echo str_replace('&', '&', $contact); ?>"><?php echo $text_contact; ?></a></li>
<li><a href="<?php echo str_replace('&', '&', $sitemap); ?>"><?php echo $text_sitemap; ?></a></li>
</ul>
</div>
<div class="bottom"> </div>
</div>
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
To make sure I removed completely the content of that file and copied yours instead and this is what I get now on my homepage:
Notice: Undefined variable: text_faq in /home/cleo/public_html/catalog/view/theme/sport/template/module/information.tpl on line 8

Tks
Cleo
Opencart v1.5.4.1 fr/en
Theme: Custom
vqmod-2.6.0
PHP: 7.3 (ea-php73)
And don't forget the entry in the language file(s).fido-x wrote:In "catalog/controller/module/information.php", insert the following:Code: Select all
$this->data['text_faq'] = $this->language->get('text_faq'); $this->data['faq'] = HTTP_SERVER . 'index.php?route=information/faq';
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!

I know absolutely nothing about programming that's why I'm so lost, but I am learning as I go with the help of all the nice people in this forum!
Thank you again for your quick reply and all your help!
Cleo


Opencart v1.5.4.1 fr/en
Theme: Custom
vqmod-2.6.0
PHP: 7.3 (ea-php73)

Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
I installed the module in extension and if I look at "Position" it's Catalog
But because my store is in French it should say Catalogue (well I think that's the reason but I may be wrong!)

If I'm correct then I don't know where to change it

Opencart v1.5.4.1 fr/en
Theme: Custom
vqmod-2.6.0
PHP: 7.3 (ea-php73)
Now when I click on Catalogue the FAQs does not appear
So of course when I go to the store and select FAQs it says: FAQ Page Not Found!
I just noticed also that the FAQ does not appear in the site map page

Ok, I'm off to bed now and will check again later cause now I have no more idea

@Fido-x I hope you will be able to help me one more time! Or anyone else

Opencart v1.5.4.1 fr/en
Theme: Custom
vqmod-2.6.0
PHP: 7.3 (ea-php73)

The only thing that is weird is that in your file it says From the menu, select "Catalog–>FAQs".
Assuming you have followed the installation and configuration instructions properly, you will be presented with a page displaying a list of your FAQs. You may delete the sample question, or edit it to suit.
To insert a new entry, click the "Insert" button. The entry page contains "Question" and "Answer" fields to hold the question and answer.
By clicking the "Data" tab you will be able to set the status of the entry to "Enabled" or "Disabled" (disabled by default). You can also set the sort order on this page.
When done, click "Save".
What is funny for me the FAQ doesn't appear in my Catalog drop down, it's showing in Extension/Module!
So I went trough all (a lot) my files and finally found the one with the English text: Frequently Ask Question and translate them in French, I didn't find any Sample questions text though. So I am doing my own.
The only thing is the FAQ does not appear in the Site Map but that's not a big deal!
Well for a French Blond dummy who knows nothing about programming I'm proud of myself


Opencart v1.5.4.1 fr/en
Theme: Custom
vqmod-2.6.0
PHP: 7.3 (ea-php73)
Users browsing this forum: No registered users and 4 guests