Post by Vectra » Sat Jun 02, 2012 6:05 am

fresh v1.5.2.1 In OpenCart Admin/catalog/information, I can easily insert new pages under the "information" footer. How can I do this for "customer service" in footer? Should I create the page in admin under "information" and then somehow move it to customer service?
The footer.tpl file at theme/template doesn't refer to each page individually for "information" as it seems to for "service". See below:

Code: Select all

<div id="footer">
  <div class="column">
    <h3><?php echo $text_information; ?></h3>
    <ul>
      <?php foreach ($informations as $information) { ?>
      <li><a href="<?php echo $information['href']; ?>"><?php echo $information['title']; ?></a></li>
      <?php } ?>
    </ul>
  </div>
  <div class="column">
    <h3><?php echo $text_service; ?></h3>
    <ul>
      <li><a href="<?php echo $contact; ?>"><?php echo $text_contact; ?></a></li>
      <li><a href="<?php echo $return; ?>"><?php echo $text_return; ?></a></li>
      <li><a href="<?php echo $sitemap; ?>"><?php echo $text_sitemap; ?></a></li>
    </ul>
  </div>
How do I add new pages (like warranty or manuals) under "customer service" in the footer?
Thank you.
Last edited by Vectra on Sun Jun 03, 2012 7:11 am, edited 1 time in total.

New member

Posts

Joined
Sat May 12, 2012 3:32 am

Post by sans » Sat Jun 02, 2012 10:49 am

You must create some file for new page, in folder controller, language and view. After that you must change file footer to put link.

kaos jersey, jersey bola, baju bola, baju bola terbaru, baju bola murah


Active Member

Posts

Joined
Tue Dec 07, 2010 9:18 am

Post by Vectra » Sat Jun 02, 2012 2:15 pm

Thank you for the reply. I will look into those files. I am not sure that I will get it figured out, but I will try.
As I understand what you said, I establish the existance and location of the new file by following your directions. How would I modify/edit and add content to the file itself? Would I see it in Admin somewhere?
Thank you.

New member

Posts

Joined
Sat May 12, 2012 3:32 am

Post by mcamca » Sat Jun 02, 2012 7:12 pm

How do I add new pages (like warranty or manuals) under "customer service" in the footer?
Thank you.
This was easy to achieve in some earlier 1.4 versions of OC but was left out of v1.5.2.1 for some reason! Maybe it interferes with other functions but I have not yet found this to be true!
To achieve this in v1.5.2.1 in:
/catalog/model/catalog/information.php
Change:

Code: Select all

	public function getInformations() {
		$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "information i LEFT JOIN " . DB_PREFIX . "information_description id ON (i.information_id = id.information_id) LEFT JOIN " . DB_PREFIX . "information_to_store i2s ON (i.information_id = i2s.information_id) WHERE id.language_id = '" . (int)$this->config->get('config_language_id') . "' AND i2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND i.status = '1' ORDER BY i.sort_order, LCASE(id.title) ASC");
		
		return $query->rows;
	}
To:

Code: Select all

	public function getInformations() {
		$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "information i LEFT JOIN " . DB_PREFIX . "information_description id ON (i.information_id = id.information_id) LEFT JOIN " . DB_PREFIX . "information_to_store i2s ON (i.information_id = i2s.information_id) WHERE id.language_id = '" . (int)$this->config->get('config_language_id') . "' AND i2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND i.status = '1' AND i.sort_order <> '-1' ORDER BY i.sort_order, LCASE(id.title) ASC");
		
		return $query->rows;
	}
Create a new information page in admin containing the data you want and give it a sort order of 1
Enable the page and "Save".
The new page will now appear in the information section of the footer.
Go to the page and copy the address which shows in your browser.
Go back into admin and give this page a sort order of -1 and "Save".
You'll now find that the page with a sort order of -1 does not show in the information section.
Repeat the above for any additional pages.
You can now hardcode the above page addresses where you like under "Extras", "Customer Service" etc. in footer.tpl
eg. for Customer services enter:

Code: Select all

  <div class="column">
    <h3><?php echo $text_service; ?></h3>
    <ul>
      <li><a href="index.php?route=information/information&information_id=20">Warranty</a></li>
      <li><a href="index.php?route=information/information&information_id=21">Manuals</a></li>
      <li><a href="<?php echo $contact; ?>"><?php echo $text_contact; ?></a></li>
      <li><a href="<?php echo $return; ?>"><?php echo $text_return; ?></a></li>
      <li><a href="<?php echo $sitemap; ?>"><?php echo $text_sitemap; ?></a></li>
    </ul>
  </div>
Where the address for the 2 pages is determined as above (NOT THE ABOVE EXAMPLES OF 20 and 21).
BACKUP ANY FILES BEFORE CHANGING!
Last edited by mcamca on Sat Jun 02, 2012 7:37 pm, edited 1 time in total.

Active Member

Posts

Joined
Fri Aug 06, 2010 5:57 pm

Post by mcamca » Sat Jun 02, 2012 7:30 pm

If the manuals you are referring to are in pdf format, they can be uploaded to the server anywhere that you like and opened in a new window using code similar to the following:

Code: Select all

  <div class="column">
    <h3><?php echo $text_service; ?></h3>
    <ul>
      <li><a href="index.php?route=information/information&information_id=20">Warranty</a></li>
      <li><a href="catalog/view/theme/yourtheme/pdfs/manuals.pdf" target="_manuals">Manuals</a></li>
      <li><a href="<?php echo $contact; ?>"><?php echo $text_contact; ?></a></li>
      <li><a href="<?php echo $return; ?>"><?php echo $text_return; ?></a></li>
      <li><a href="<?php echo $sitemap; ?>"><?php echo $text_sitemap; ?></a></li>
    </ul>
  </div>
"catalog/view/theme/yourtheme/pdfs/manuals.pdf" is just an example of the location of your pdf file.
HOPE THIS HELPS!

Active Member

Posts

Joined
Fri Aug 06, 2010 5:57 pm

Post by Vectra » Sun Jun 03, 2012 7:32 am

Excellent helpful reply! Thank you very much. I will do this on Monday.
I guess I have to ask this: what is the code for a select drop down box to have these pdf manuals in? Just listing the manuals is fine, but a drop down is cleaner.
Thank you very much.

New member

Posts

Joined
Sat May 12, 2012 3:32 am

Post by mcamca » Sun Jun 03, 2012 10:27 pm

Try this:

Code: Select all

  <div class="column">
    <h3><?php echo $text_service; ?></h3>
    <ul>
      <li><a href="index.php?route=information/information&information_id=20">Warranty</a></li>
      <li>Manuals:<br />
      <select name="manuals" onchange="ob=manuals;window.open(ob.options[ob.selectedIndex].value)">
      <option value="">Select....</option>
      <option value="http://www.yahoo.com/">YAHOO</option>
      <option value="http://www.google.com/">GOOGLE</option>
      <option value="http://www.altavista.com/">ALTAVISTA</option>
      <option value="http://www.amazon.com/">AMAZON</option></select></li>
      <li><a href="<?php echo $contact; ?>"><?php echo $text_contact; ?></a></li>
      <li><a href="<?php echo $return; ?>"><?php echo $text_return; ?></a></li>
      <li><a href="<?php echo $sitemap; ?>"><?php echo $text_sitemap; ?></a></li>
    </ul>
  </div>
Change" YAHOO" to the manual name and "http://www.yahoo.com/" to the address on your server for that manual.
Do the same for the rest, delete or add options as you want!
Have'nt checked in v1.5.2.1 but should work!

Active Member

Posts

Joined
Fri Aug 06, 2010 5:57 pm

Post by Vectra » Tue Jun 05, 2012 5:47 am

Thank you again.
Moving the information page over was easy (because of your instructions). As I suspected, it did break the SEO Keyword ability if the keyword is added after setting up the link. I will update the footer.tpl href= address for after the SEO keyword has taken effect.
I tried your nice select dropdown code. I put the below in the text body on the information page. It showed up nicely and worked in IE8 after I clicked to "allow popups". In Chrome, I didn't see anything happen at all.

Code: Select all

      <li>Manuals:<br />
      <select name="manuals" onchange="ob=manuals;window.open(ob.options[ob.selectedIndex].value)">
      <option value="">Select....</option>
      <option value="http://www.yahoo.com/">YAHOO</option>
      <option value="http://www.google.com/">GOOGLE</option>
      <option value="http://www.altavista.com/">ALTAVISTA</option>
      <option value="http://www.amazon.com/">AMAZON</option></select></li>
I think I will just make a page in "information" and highlight and insert hyperlinks. The one problem I am having is something is overriding the font size when I add the link. The link text becomes smaller, underlined and hot, but ignores my attempts to change its font size. I want these links larger not smaller.
Thank you again.

New member

Posts

Joined
Sat May 12, 2012 3:32 am

Post by mcamca » Tue Jun 05, 2012 9:57 pm

The select box probably did'nt work in chrome because there was no form field.
Try:

Code: Select all

  <div class="column">
    <h3><?php echo $text_service; ?></h3>
    <ul>
      <li><a href="<?php echo $contact; ?>"><?php echo $text_contact; ?></a></li>
      <li><a href="<?php echo $return; ?>"><?php echo $text_return; ?></a></li>
      <li><a href="<?php echo $sitemap; ?>"><?php echo $text_sitemap; ?></a></li>
      <li><a href="index.php?route=information/information&information_id=20">Warranty</a></li>
      <li><form action="../">Manuals:<br />
      <select name="manuals" onchange="ob=this.form.manuals;window.open(ob.options[ob.selectedIndex].value)">
      <option value="">Select....</option>
      <option value="http://www.yahoo.com/">YAHOO</option>
      <option value="http://www.google.com/">GOOGLE</option>
      <option value="http://www.altavista.com/">ALTAVISTA</option>
      <option value="http://www.amazon.com/">AMAZON</option></select></form></li>
    </ul>
  </div>
If this does'nt work in Chrome then you probably need a separate javascript function which is used as the onChange event for the select box!
(The manuals have been moved to the bottom of the list because a form closure produces an ugly gap!)

If you want to override the default css settings for a link on an Information page, use the following:

Code: Select all

<a href="http://www.google.com" style="text-decoration: none" target="_manuals"><span style="color: #000000; font-size: 14px">Manual Name</span></a>
Change font-size, link, Manual Name and color to those that you want!

Active Member

Posts

Joined
Fri Aug 06, 2010 5:57 pm

Post by Vectra » Wed Jun 06, 2012 5:26 am

Thank you again. I put <span style=" font-size: 18px"> in every instance of linked text on a couple of my pages done in "information". It worked well.
Your latest drop down select box worked great in GC and FF. In IE8 and IE9 I had to allow pop-ups and then select a 2nd time, but it looked and worked great.
Thank you.

New member

Posts

Joined
Sat May 12, 2012 3:32 am

Post by mcamca » Wed Jun 06, 2012 6:40 am

Glad it worked and nice to get thanked!
Most do not bother to thank or say anything!

Active Member

Posts

Joined
Fri Aug 06, 2010 5:57 pm

Post by Vectra » Wed Jun 06, 2012 7:33 am

I have heard that Super Heroes have the same problem... People are so happy to get their cats back out of the tree that they don't notice you flying off to another rescue.

New member

Posts

Joined
Sat May 12, 2012 3:32 am
Who is online

Users browsing this forum: No registered users and 39 guests