Total Pageviews

Wednesday, October 10, 2012

Follow kvn_krishna on Twitter

Opencart issue . user multiple address not able to delete - bug fixed






Opencart version 1.5.3 and above...


we need to edit the code in catalog/controlles/account/address 
find this line " $this->model_account_address->getTotalAddresses()"

existing code : 

if ($this->model_account_address->getTotalAddresses()) {
 $this->error['warning'] = $this->language->get('error_delete');
}

New Code :
(replace the above "existing code" to "New code" )
if ($this->model_account_address->getTotalAddresses() < 1) {
 $this->error['warning'] = $this->language->get('error_delete');
}

Thanks to :

http://code.google.com/p/opencart/issues/detail?can=2&start=0&num=100&q=&colspec=ID Type Status Priority Milestone Owner Summary Reporter&groupby=&sort=&id=995

Magento CMS ADMIN Panel

Follow kvn_krishna on Twitter
 

In Admin-> CMS Module we have four Sub modules

- Pages               { Its used to create the new pages. }
- Static blocks     { Its used to create the new static block (like advertisement blocks etc) we can use this block where we wanted. }
- Widgets            { Its used to improve the appearance of the store and communicate to other applications (like social network sites)  }
- Polls                 { Its used to know the consumer or online users satisfaction ,and used to find and avoid the lack of Business.  }


Pages

How to create the page?
 Admin- > CMS ->  Pages -> Add new page(Button)
      - Page information *
             we can set page which store we wanted .

       - Content

       - Design
             we have four type of layout styles . 1 column ,2 columns with left bar ,2 columns with right bar ,3 columns.
             our design will set the page style.

       - Mata data
         Content and Key words used to increase the traffic of our page and site.

After these we have to save the page.    

If you want add the page link means you can use

 <a href="{{store direct_url="new_home"}}">New Home</a>

call the above anchor tag in where you want. here " new_home" is the  URL Key and "New Home"  which is the Page title.

     
Static blocks

How to create the Static blocks?

Admin- > CMS ->  Static blocks-> Add new Block(Button)

    Block Title *  
    Identifier *    
    Store View *  
    Status *  
    Content *
 we have to fill the above all .


If u wanted to add the block to ur page means you can use  following code


{{block type="cms/block" block_id="ehp" }}

here ehp is a  Identifier what you gave.

call above code to your page or which page you wanted.  


Widgets

Admin- > CMS ->  Pages -> Widgets ->Add New Widget Instance(Button) .
   - Settings we can use the existing Widgets.

How to create Widgets by coding level through the MVC approach ?

Reference Url

  http://www.magentocommerce.com/knowledge-base/entry/tutorial-creating-a-magento-widget-part-1 .


if you want to call the widget in your block or page  go     content ->  WYSIWYG editor -> Insert widget option (2nd one from left top on editor)

Polls

Admin- > CMS ->  Pages -> Polls  ->Add New Poll (Button) .

Poll information and poll question and answer is needed . we have to fill above all.

and we have to "open" the polling option if we want.

Note : If we open(Active) two or three polling options means . that will show the front end one by one.
Follow kvn_krishna on Twitter
 


Multiple Pop in same page-Jquery .



u can use the following code you can easly add the same type of popups in samp page with diff "div"





<head runat="server">
    <title></title>
      <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js" type="text/javascript"></script>  <style type="text/css">
        .web_dialog_overlayback
        {
            position: fixed;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            height: 100%;
            width: 100%;
            margin: 0;
            padding: 0;
            background: #000000;
            opacity: .15;
            filter: alpha(opacity=15);
            -moz-opacity: .15;
            z-index: 101;
            display: none;
        }
        .web_dialog
        {
            display: none;
            position: fixed;
            width: 380px;
            height: 200px;
            top: 50%;
            left: 50%;
            margin-left: -190px;
            margin-top: -100px;
            background-color: #ffffff;
            border: 2px solid #336699;
            padding: 0px;
            z-index: 102;
            font-family: Verdana;
            font-size: 10pt;
        }
        .web_dialog_title
        {
            border-bottom: solid 2px #336699;
            background-color: #336699;
            padding: 4px;
            color: White;
            font-weight:bold;
        }
        .web_dialog_title a
        {
            color: White;
            text-decoration: none;
        }
        .align_right
        {
            text-align: right;
        }
    </style>
    <script type="text/javascript">

        $(function (){
            $("#btnShowSimple").click(function ()
            {$("#overlay").show(); $("#dialog").fadeIn(300);
            if (modal){$("#overlay").unbind("click"); }
            else {$("#overlay").click(function (){$("#overlay").hide();$("#dialog").fadeOut(300);});}});
            $("#btnClose").click(function (){$("#overlay").hide();$("#dialog").fadeOut(300);});});

 $(function (){ $("#Simple").click(function ()
            {$("#overlay1").show(); $("#dialog1").fadeIn(300);
            if (modal){$("#overlay1").unbind("click"); }
            else{$("#overlay1").click(function (){$("#overlay1").hide();$("#dialog1").fadeOut(300);});}});

            $("#btnClose1").click(function (){$("#overlay1").hide();$("#dialog1").fadeOut(300);});});
      
    </script>

</head>
<body>

    <h3>JQuery Multiple Popup Dialogs in same page </h3>
 
    <a id="btnShowSimple" value="Simple Dialog" /> cickhere</a>
    <br />
    <br />    
 
 
    <div id="overlay" class="web_dialog_overlayback"></div>
        <div id="dialog" class="web_dialog">
   
                    <a href="#" id="btnClose">Close</a>        
       content one <!--you can add anything inside of this div-->
    </div>
 
     <br />
    <br />    
   
    <a id="Simple" value="Simple Dialog" /> donglee</a>
 
    <div id="overlay1" class="web_dialog_overlay"></div>
        <div id="dialog1" class="web_dialog">
   
                    <a href="#" id="btnClose1">X</a>        
   content two  <!--you can add anything inside of this div-->
    </div>
 

 
</body>
</html>