Webocreation

Sunday, April 24, 2011

Latest News module for the opencart




Click to download the Latest News Module of opencart
Unzip the files and

Copy and paste the files in their respective folders.
====================================================
FOR BACK END
====================================================
Paste the following

<li><a href="<?php echo  HTTPS_SERVER . 'index.php?route=catalog/news&token=' . $this->session->data['token']; ?>">Latest News</a></li>

in the admin\view\template\common\header.tpl

below these lines

       <li><a href="<?php echo $product; ?>"><?php echo $text_product; ?></a></li>
        <li><a href="<?php echo $manufacturer; ?>"><?php echo $text_manufacturer; ?></a></li>
        <li><a href="<?php echo $download; ?>"><?php echo $text_download; ?></a></li>
======================================================


Now open in the browser login in the admin

Give permission to the user (You can set the permission by admin only) for catalog/news

admin>> System>> Users>> User Groups>> Then select the user and click edit and check the catalog/news  on both the access permission and the modify permission


======================================================

After that click on the Catalog>> Latest News
======================================================
FOR FRONT END SETTINGS
======================================================
Place "Latest News" by linking with the link
        "index.php?route=information/news"
Now clicking on the link shows the latest news in the desc order
======================================================

17 comments:

  1. I have question: When i click for Details, i must log in for reading. How can i change it? don't need to log in? Thanks so much

    ReplyDelete
  2. I have to maintain in the code i will do it soon.

    ReplyDelete
  3. i've instaled it but i cant see my news in my front-end...

    ReplyDelete
  4. I have a problem. In admin panel i have 4 fields in 2 categoryes:
    _________________________________
    (1)
    title
    description
    __________________________________
    (2)
    title
    description
    __________________________________

    When i insert text in (1) the text from (2) dissapears and also what i've inserted in (1) and i can't see anything in front-end

    When i insert text in (2), my text gets copyed also in (1) and i can see it in front-end


    Why?

    Thanks.
    Alexis

    ReplyDelete
  5. Hello, I would like to ask 2 thinks:
    1) How can I change the encoding? In which files is it determined? I am asking because I am using greeks and all I get in both back and front end is " ???? " when I am using something different from english.

    2) How can I change the title of articles? I want the title to be bold and might bigger from text. Which files manage it?

    ReplyDelete
  6. Hi... i have a problem... in admin panel i see 2 fields for inserting news text and 2 for inserting news title.

    When i insert in the 1st one all my news get delete. When i insert into the secound bouth 1st and 2nd fields get the 2nd's texts.


    Why? thank you!

    ReplyDelete
  7. hey,

    theres a litte problem with my integration of this module. i managed to install it and make it work in backend but from frontend when i make a link to "index.php?route=information/news" it "says The page you requested cannot be found!" how could i fix it?

    ReplyDelete
  8. I have this mod installed on OC version 1.4.9.5 and it works just fine in the back end but when I go to index.php?route=information/news it displays the user account page which is only supposed to display at index.php?route=account/account and is not supposed to display at all to someone that is not logged in. Any ideas on what the problem is? Please help I really want this mod!

    ReplyDelete
  9. if (!$this->customer->isLogged()) {
    $this->session->data['redirect'] = HTTPS_SERVER . 'index.php?route=account/account';

    $this->redirect(HTTPS_SERVER . 'index.php?route=account/login');
    }



    remove those line in the controller page which solve the problem

    http://rupaknepali.com.np

    ReplyDelete
  10. Hi Rupack , i have installed your module .. thanks ...it´s cool

    Now i have one question... on .htaccess file, how to convert your URL into friendly URL´s ?

    Check mine URL

    http://www.fardaseuniformes.com/index.php?route=information/news/newsDetails&news_id=15

    ReplyDelete
  11. Hi Rupak,

    I have tried this on 1.5.1 and this is the error I get:

    Fatal error: Cannot access private property Document::$title in /home/giftex/public_html/admin/controller/catalog/news.php on line 8

    ReplyDelete
  12. I tried fixing this and now I get this error:

    Error: Table 'giftex_opencart.giftexnews' doesn't exist
    Error No: 1146
    SELECT * FROM giftexnews order by news_id desc

    ReplyDelete
  13. Cant get this module to show on the frontend.

    ReplyDelete
  14. This program doesn't seem to have a front-end language file.

    ReplyDelete
  15. i have done it for 1.5.2.1v and in the bckend i am getting error as
    Notice: Error: Table 'tucherriesmain.news' doesn't exist
    Error No: 1146
    SELECT * FROM news c LEFT JOIN news_description cd ON (c.news_id = cd.news_id) WHERE c.parent_id = '0' AND cd.language_id = '1' ORDER BY c.sort_order, cd.name ASC in C:\wamp\www\tucherriesmain\system\database\mysql.php on line 49



    and in front end

    Warning: Invalid argument supplied for foreach() in C:\wamp\www\tucherriesmain\catalog\controller\common\column_left.php on line 49Warning: Invalid argument supplied for foreach() in C:\wamp\www\tucherriesmain\catalog\controller\common\column_right.php on line 49Warning: Invalid argument supplied for foreach() in C:\wamp\www\tucherriesmain\catalog\controller\common\content_top.php on line 49Warning: Invalid argument supplied for foreach() in C:\wamp\www\tucherriesmain\catalog\controller\common\content_bottom.php on line 49


    help me plss

    ReplyDelete
  16. What to do with error 1146. I can't find the answer.

    ReplyDelete