Post by MarketInSG » Sun Feb 10, 2013 8:50 am

if you changed the file name, you need to change references of all 'static' to 'product' so it should be Class ControllerInformationProducts now


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by sssagar.36 » Fri Mar 08, 2013 1:27 pm

How to show my latest product on custom page. i already created a custom page bt didn't solve these product problem can u plz. tell how can i do that??

Newbie

Posts

Joined
Wed Feb 06, 2013 9:59 am

Post by MarketInSG » Fri Mar 08, 2013 5:28 pm

use the layouts function in system > design > layouts. And do not PM me for personal support!


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by pittsleyb » Mon Apr 01, 2013 11:31 am

I got this to work but am getting an error which goes away when you click search. My goal is to have the page load no results until the person enters a search, then display the records matching, also if they hit search without putting anything in i want it to say no results. It seems to work but something needs to be tweaked to stop that error. Here is the link.

http://www.indoorharvestgardens.com/ind ... ion/static

Newbie

Posts

Joined
Mon Apr 01, 2013 11:29 am

Post by pittsleyb » Mon Apr 01, 2013 11:35 am

Hi I got this to work but when you load the page there is an error and also it will display all the records if you just hit search, can i make the field required and also not get this error?

http://www.indoorharvestgardens.com/ind ... ion/static

Newbie

Posts

Joined
Mon Apr 01, 2013 11:29 am

Post by MarketInSG » Mon Apr 01, 2013 6:46 pm

Code: Select all

if (isset($this->request->post['terms'])) { your codes }
you are missing this


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by pittsleyb » Mon Apr 01, 2013 11:48 pm

MarketInSG wrote:

Code: Select all

if (isset($this->request->post['terms'])) { your codes }
you are missing this
got it to work making a minor change, thanks so much!

Code: Select all

if (isset($this->request->post['term'])) { your codes }

Newbie

Posts

Joined
Mon Apr 01, 2013 11:29 am

Post by sarikabtech » Tue May 28, 2013 2:23 am

useful info .thank you so much .

Sarika Singh
http://www.zealneotech.com


Newbie

Posts

Joined
Fri May 24, 2013 4:31 pm
Location - Delhi,India

Post by rsink » Wed Aug 28, 2013 6:42 am

What does it mean if you get the error:
Fatal error: Class 'Controllerinformationstatic' not found in /home/store/public_html/store/vqmod/vqcache/vq2-system_engine_front.php on line 45

Newbie

Posts

Joined
Mon Aug 12, 2013 3:46 pm

Post by MarketInSG » Wed Aug 28, 2013 10:11 am

it means your controller file isn't found. They are looking for Controllerinformationstatic


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by frankwho » Sun Sep 29, 2013 5:47 am

Awesome tutorial, thank you! The only thing I cannot get to work is this:
tophat wrote:
MarketInSG wrote:

Code: Select all

RewriteRule ^static$ index.php?route=information/static
Add that code into your htaccess file right after the rewrite on part. So to access your page, you can go to yoursite.com/static instead of the long url.
Simply amazing. That was easier than I thought.

I had to put it directly below

Code: Select all

RewriteBase /
for it to work, anywhere else it didn't regardeless of other rewrite rules.

Thanks again.

New member

Posts

Joined
Wed Feb 20, 2013 3:32 am

Post by MarketInSG » Sun Sep 29, 2013 10:32 am

Is your server apache? And if so, do you have a .htaccess file? Adding that line of code would allow you to access index.php?route=information/static as website.com/static


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by frankwho » Sun Sep 29, 2013 12:26 pm

Got it! I was thinking it redirected traffic to /static rather than being an alternative.
Would this work for categories as well?

New member

Posts

Joined
Wed Feb 20, 2013 3:32 am

User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by maccadon » Tue Oct 15, 2013 6:55 pm

Thanks for the great guide.
I got one question about the HTacces rewrite. Will google see this as 2 pages?

Active Member

Posts

Joined
Thu Aug 05, 2010 9:57 pm

User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by maccadon » Tue Oct 15, 2013 7:44 pm

Your Awesome :) !

Active Member

Posts

Joined
Thu Aug 05, 2010 9:57 pm

Post by josee225 » Fri Nov 15, 2013 10:15 pm

Hi,

this is exactly what I was looking for, because I wanted a page called weekly specials, and use the featured module on that page to create a landing page in my store for my weekly specials.

So I went ahead and created the files, but changed all "information/static" to "product/weekly-specials" and of course uploaded the files to the proper /product folders. I created the route in layout and added the Featured module to the route.

I am getting a blank page, so I was hoping you could help me? Thank you for your time!

Here is the code for my files:
controller/product/weekly-specials.php

Code: Select all

    <?php
    class ControllerProductWeekly-specials extends Controller {
       private $error = array();
         
         public function index() {
          $this->language->load('product/weekly-specials'); //Optional. This calls for your language file

           $this->document->setTitle($this->language->get('heading_title')); //Optional. Set the title of your web page.

             $this->data['breadcrumbs'] = array();

             $this->data['breadcrumbs'][] = array(
               'text'      => $this->language->get('text_home'),
             'href'      => $this->url->link('common/home'),           
               'separator' => false
             );

             $this->data['breadcrumbs'][] = array(
               'text'      => $this->language->get('heading_title'),
             'href'      => $this->url->link('product/weekly-specials'),
               'separator' => $this->language->get('text_separator')
             );   
             
           $this->data['heading_title'] = $this->language->get('heading_title'); //Get "heading title" from language file.

          if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/weekly-specials.tpl')) { //if file exists in your current template folder
             $this->template = $this->config->get('config_template') . '/template/product/weekly-specials.tpl'; //get it
          } else {
             $this->template = 'default/template/product/weekly-specials.tpl'; //or get the file from the default folder
          }
         
          $this->children = array( //Required. The children files for the page.
             'common/column_left',
             'common/column_right',
             'common/content_top',
             'common/content_bottom',
             'common/footer',
             'common/header'
          );
               
          $this->response->setOutput($this->render());     
         }
    }
    ?>
view/theme/default/template/product/weekly-specials.tpl

Code: Select all

    <?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
    <div id="content"><?php echo $content_top; ?>
      <div class="breadcrumb">
        <?php foreach ($breadcrumbs as $breadcrumb) { ?>
        <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
        <?php } ?>
      </div>
      <h1><?php echo $heading_title; ?></h1>
     
<p>My own content</p>
     
       <?php echo $content_bottom; ?></div>
    <?php echo $footer; ?>
language/english/product/weekly-specials.php

Code: Select all

    <?php
    // Heading
    $_['heading_title']  = 'Weekly Specials'; //Add as many as you want, but remember to call for it in the controller file before you can use it in the template
    ?>

New member

Posts

Joined
Tue Dec 27, 2011 10:42 pm

Post by MarketInSG » Sat Nov 16, 2013 12:10 am

Code: Select all

class ControllerProductWeekly-specials extends Controller {
this is your issue


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by josee225 » Sat Nov 16, 2013 12:33 am

Thanks for the quick answer! How should I fix it?

New member

Posts

Joined
Tue Dec 27, 2011 10:42 pm
Who is online

Users browsing this forum: No registered users and 19 guests