Tuesday, April 26, 2011

Php errors: Deprecated: Call-time pass-by-reference has been deprecated and its solution






Got problems with the Notice in the code you can simply remove them by pasting the line below

error_reporting (E_ALL ^ E_NOTICE);

Notice: Use of undefined constant action - assumed 'action' in D:\web\xampp\htdocs\....\....\..\.....php(1) : eval()'d code on line 43



Deprecated: Call-time pass-by-reference has been deprecated

if we get this errors then we just have to change 
allow_call_time_pass_reference = off 
 to

allow_call_time_pass_reference = on


at php.ini file


After this don't forget to restart your xampp or wamp or means server.


Ways to find the php.ini file
Make one file and write <?php echo phpinfo(); ?>

and run it in the browser and search for the word "php.ini"
According to above mine php.ini file is included in the D:\web\xampp\php folders.

By this you will be able to get the php.ini file and change the setting as per your need.

Thanking You
Rupak Nepali

Rupak Nepali Admin Menu Management in Opencart




Rupak Nepali Admin Menu Management in Opencart
Click To Download Rupak Nepali Admin Menu Managment of Opencart 

Unzip the file and copy in the respective folder then it works


The file at the admin/view/template/common/header.tpl is overridden so better to keep the back up of the file if you dont like it you can use the previous one.

If you have performed any changes in the menu then it may not work.


Thanking You
Rupak Nepali

hiding menu when no permission is given, show only the menu which have permission, menu according to the permission given in opencart.

Sunday, April 24, 2011

How to add Special Buttons in the main menu of opencart




I would like to ceate a new button next to the "Home button" on default template. Called "Specials" and then link it to specials offers page.

Any one have any ideas on how to create it as same as the defult colors etc and link it to specials offers page.

I am learning heaps about programming etc.

=========================
Answer:
Remove this from catalog/view/template/common/header.tpl
<div class="div4"><a href="<?php echo str_replace('&', '&amp;', $home); ?>" id="tab_home"><?php echo $text_home; ?></a>
      <?php if (!$logged) { ?>
      <a href="<?php echo str_replace('&', '&amp;', $login); ?>" id="tab_login"><?php echo $text_login; ?></a>
      <?php } else { ?>
      <a href="<?php echo str_replace('&', '&amp;', $logout); ?>" id="tab_logout"><?php echo $text_logout; ?></a>
      <?php } ?>
      <a href="<?php echo str_replace('&', '&amp;', $account); ?>" id="tab_account"><?php echo $text_account; ?></a><a href="<?php echo str_replace('&', '&amp;', $cart); ?>" id="tab_cart"><?php echo $text_cart; ?></a><a href="<?php echo str_replace('&', '&amp;', $checkout); ?>" id="tab_checkout"><?php echo $text_checkout; ?></a></div>

And Paste on the same place the line below
<div class="div4">
    <a href="<?php echo str_replace('&', '&amp;', $home); ?>" id="tab_home"><?php echo $text_home; ?></a>

     <a href="<?php echo str_replace('&', '&amp;', $special); ?>"><?php echo $text_special; ?></a>
      <?php if (!$logged) { ?>
      <a href="<?php echo str_replace('&', '&amp;', $login); ?>" id="tab_login"><?php echo $text_login; ?></a>
      <?php } else { ?>
      <a href="<?php echo str_replace('&', '&amp;', $logout); ?>" id="tab_logout"><?php echo $text_logout; ?></a>
      <?php } ?>
      <a href="<?php echo str_replace('&', '&amp;', $account); ?>" id="tab_account"><?php echo $text_account; ?></a><a href="<?php echo str_replace('&', '&amp;', $cart); ?>" id="tab_cart"><?php echo $text_cart; ?></a>

      </div>

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
======================================================

Saturday, April 23, 2011

Latest News Extension coming Soon wait until Sunday, April 24, 2011




Latest News Extension coming Soon wait until Sunday, April 24, 2011

I am now working on the Latest News Showing in the Opencart. I have almost completed it and i am checking it so please wait until Sunday, April 24, 2011 after that you will be able to get the latest news module for free in the opencart.

Thanking You all for having patience.

Rupak Nepali

Banner Advertisement management System in the opencart
What i have found is that the banner advertisement management system can be used with my existing slider banner management syste,.

Visit this link http://nepalrupak.blogspot.com/2011/04/sliding-banner-management-code-for.html and you will be able to get the banner management system for the opencart where administrator can easily manage the banner and links that exists.

The 'Banner ADS System' has been designed to allow the administrator to advertise two main types of banner ads, both types can be run side by side from the same admin so double the whammy...

1. LONG BANNER ADS (480X100*): these banners are rotators, the banner one takes up one banner space and rotates every 10 seconds, banners are linkable and have title information (edit via admin). These are set to be displayed at he top of the page (but can be moved manually anywhere).

2. MINI BANNER ADS (160X100*): these are mini ads that appear in a module on the left AND right columns (YES NOW BOTH), these are displayed as a vertical list.

See the workflow images for guidance.

Friday, April 22, 2011

Rupak Nepali Wish-list extension for the Opencart




Wish-list extension for the Opencart

Click To Download The Wishlist of Opencart 

Unzzip the file and place the file to the respective folders.
===================================

But in the product.tpl we have to kep the code by deleting the code below:

  <input type="text" name="quantity" size="3" value="<?php echo $minimum; ?>" />
                <a onclick="$('#product').submit();" id="add_to_cart" class="button"><span><?php echo $button_add_to_cart; ?></span></a>
                <?php if ($minimum > 1) { ?><br/><small><?php echo $text_minimum; ?></small><?php } ?>
              </div>
              <div>
                <input type="hidden" name="product_id" value="<?php echo $product_id; ?>" />
                <input type="hidden" name="redirect" value="<?php echo str_replace('&', '&amp;', $redirect); ?>" />               
              </div>

paste the following code:

        <input type="text" name="quantity" size="3" value="<?php echo $minimum; ?>" />    <br />    <br />
                <input name="" onClick="f1.action='index.php?route=checkout/cart'; return true;" type="image" src="catalog/view/theme/candid/image/add-tocart.png" />
                <?php if ($minimum > 1) { ?><br/><small><?php echo $text_minimum; ?></small><?php } ?>
             
          
                <input type="hidden" name="product_id" value="<?php echo $product_id; ?>" />
                <input type="hidden" name="redirect" value="<?php echo str_replace('&', '&amp;', $redirect); ?>" />               
               
               
        <input name="" onClick="f1.action='index.php?route=account/wish_list&product_id=<?php echo $product_id; ?>'; return true;" type="image" src="catalog/view/theme/candid/image/add-to-wishlist.png" />

========================================
The main theme is to give the form name="f1"

Find the below code:


<form action="<?php echo str_replace('&', '&amp;', $action); ?>" method="post" enctype="multipart/form-data" id="product">

Repalce with

 <form action="<?php echo str_replace('&', '&amp;', $action); ?>" method="post" enctype="multipart/form-data" id="product" name="f1">

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

Hope that the above code workout if it doesnot comment on

http://nepalrupak.blogspot.com

Thanking You for your time to use it.

wishlist module for the opencart, wishlist component for the opencart, opencart wishlist, download wishlist for free opencart, opencart wishlist for free

Thursday, April 21, 2011

Document library functions




Document library functions in the opencart
setTitle($title):
The title of the page is set with the call of $this->document->setTitle($title); where $title is the parameter which take the string.
public function setTitle($title) {
$this->title = $title;
}
getTitle():
$this->document->setTitle() means the title is get and set to <title> of the document
public function getTitle() {
return $this->title;
}
setDescription($description):
$this->document->setDescription($description) which set the description of the page.
public function setDescription($description) {
$this->description = $description;
}
getDescription():
$this->document->getDescription() gives us the description of the document which is embedded in the <head> of the document
public function getDescription() {
return $this->description;
}
setKeywords($keywords):
$this->document->setKeywords($keywords) set the SEO keywords
public function setKeywords($keywords) {
$this->keywords = $keywords;
}
getKeywords():
$this->document->getKeywords() get the keywords which are set for the page.
public function getKeywords() {
return $this->keywords;
}
setBase($base):
$this->document->setBase($base) the base url for the document. If we need different base url then we have to set it.
public function setBase($base) {
$this->base = $base;
}
getBase():
Retrieve the set base url
public function getBase() {
return $this->base;
}
setCharset($charset):
public function setCharset($charset) {
$this->charset = $charset;
}

getCharset():

public function getCharset() {
return $this->charset;
}
setLanguage($language):
public function setLanguage($language) {
$this->language = $language;
}
getLanguage():
public function getLanguage() {
return $this->language;
}
setDirection($direction):
public function setDirection($direction) {
$this->direction = $direction;
}
getDirection():
public function getDirection() {
return $this->direction;
}
addLink($href, $rel):
public function addLink($href, $rel) {
$this->links[] = array(
'href' => $href,
'rel' => $rel
);
}

getLinks():
public function getLinks() {
return $this->links;
}
addStyle($href, $rel = 'stylesheet', $media = 'screen'):
public function addStyle($href, $rel = 'stylesheet', $media = 'screen') {
$this->styles[] = array(
'href' => $href,
'rel' => $rel,
'media' => $media
);
}

getStyles():
public function getStyles() {
return $this->styles;
}

addScript($script):
public function addScript($script) {
$this->scripts[] = $script;
}
getScripts():
public function getScripts() {
return $this->scripts;
}

addBreadcrumb($text, $href, $separator = ' > '):
public function addBreadcrumb($text, $href, $separator = ' > ') {
$this->breadcrumbs[] = array(
'text' => $text,
'href' => $href,
'separator' => $separator
);
}

getBreadcrumbs():
public function getBreadcrumbs() {
return $this->breadcrumbs;
}

Wednesday, April 20, 2011

Rupak Nepali CSV import Export for opencart




Click to Download Rupak Nepali CSV import Export for opencart

Unzip the files and

Copy and paste the files in their respective folders.

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

  Paste the following

<li><a href="<?php echo  HTTPS_SERVER . 'index.php?route=tool/csvproduct&token=' . $this->session->data['token']; ?>">Product Category CSV</a></li>

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

below these lines

   

  <li><a href="<?php echo $error_log; ?>"><?php echo $text_error_log; ?></a></li>

  <li><a href="<?php echo $backup; ?>"><?php echo $text_backup; ?></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 tool/csvproduct

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


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

After that click on the System>> Product Category CSV

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



Sliding Banner Management Code for the opencart.




Click to Download Rupak Slider Banner Management of Opencart

From the downloaded file extract the file with WinRAR archiver and you will be able to get the zip file extracted and then follow the following steps:

Copy and paste the files in their respective folders.

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

Paste the following
<li><a href="<?php echo HTTPS_SERVER . 'index.php?route=catalog/banner&token=' . $this->session->data['token']; ?>">Banner Management</a></li>
in the admin\view\template\common\header.tpl
below these lines



<li id="catalog"><a class="top"><?php echo $text_catalog; ?></a>

<ul>

<li><a href="<?php echo $category; ?>"><?php echo $text_category; ?></a></li>

<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>

<li><a href="<?php echo $review; ?>"><?php echo $text_review; ?></a></li>

<li><a href="<?php echo $information; ?>"><?php echo $text_information; ?></a></li>
======================================================
Run the Sql in the "Sql for the database.txt" onto your database.
======================================================
Now open in the browser login in the admin
Give permission to the user (You can set the permission by admin only) for catalog/banner
admin>> System>> Users>> User Groups>> Then select the user and click edit and check the caralog/banner on both the access permission and the modify


permission


======================================================
After that click on the Catalog >> Banner Managment
======================================================
Copy the below code on which you want to show the banner changing

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


<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/slider.css">

<script type="text/javascript" src="catalog/view/theme/default/js/easySlider1.7.js"></script>

<script type="text/javascript">

$(document).ready(function(){

$("#slider").easySlider({

auto: true,

continuous: true,

numeric: true

});

});

</script>




<script type="text/javascript">

function slideSwitch() {

var $active = $('#slideshow IMG.active');



if ( $active.length == 0 ) $active = $('#slideshow IMG:last');



// use this to pull the images in the order they appear in the markup

var $next = $active.next().length ? $active.next()

: $('#slideshow IMG:first');

$active.addClass('last-active');



$next.css({opacity: 0.0})

.addClass('active')

.animate({opacity: 1.0}, 1000, function() {

$active.removeClass('active last-active');

});

}



$(function() {

setInterval( "slideSwitch()", 5000 );

});



</script>
<div id="slider">

<ul>

<?php

$result = mysql_query("SELECT * FROM banner b inner join banner_description bd on bd.banner_id=b.banner_id ");

$i=0;

while($row = mysql_fetch_array($result))

{



?>

<li>

<a href="<?php echo $row['link']; ?>">

<img src="image/<?php echo $row['image']; ?>" alt="" title="<?php echo $row['description']; ?>"/>

</a>

</li>

<?php $i++; }

?>

</ul>

</div>
======================================================

Workout with the css so that you can make as per your choice



Tuesday, April 19, 2011

Shipping Rules/Protocols that can be used




Shipping Rules/Protocols
Customer will have two options for orders under $750 and/or outside LA, OC; three options for orders over $750 who are within LA/OC area, two options for orders over $750 whose ship to address is outside of LA/OC area. We won’t be using UPS’s API since products exceed their dimension limitations.  We’ll be creating an account with ABF - I’m in the process of establishing an account.

RULES:
Order < $750
·         Will Call
·         ABF Carrier  

Order > $750
·         Will Call
·         ABF Carrier
·         Free Local Delivery inside OC/LA

Order > $750 Outside OC/LA
·         Will Call
·         ABF Carrier
·         //Order receives automatic $50 credit in lieu of Free Local Delivery// needs approval..so wait on this, just wanted to give you a headsup

ABF API
·         Utilize combination of ABF Transparent Direct Links: http://www.abfs.com/ecommerce/tlinks/ for backend and frontend integration
o   Bill of Lading – Backend only http://www.abfs.com/ecommerce/tlinks/tl_bol.asp?NCHK=SPLM
o   Pick up request – Backend only http://www.abfs.com/ecommerce/tlinks/tl_pickup.asp?NCHK=SPLM
o   Document Retrieval – Frontend Customer Account Page http://www.abfs.com/ecommerce/tlinks/tl_docret.asp?NCHK=SPLM
§  Allows customers to retrieve documents associated with shipment by purchase order# or customer reference#
o   Rate Quotation – Backend only? Should match rate provided on calculator, if calculator integrates on the frontend I don’t know why we would want to provide another quote option. Seems like potential problems would be too high to justify giving the customer this. http://www.abfs.com/ecommerce/tlinks/tl_aquote.asp?NCHK=SPLM
o   Tracking – Backend & Frontend Customer Account Page http://www.abfs.com/ecommerce/tlinks/tl_tracing.asp?NCHK=SPLM
o   Transit Time Request - Backend & Frontend Customer Account Page http://www.abfs.com/ecommerce/tlinks/tl_transit.asp?NCHK=SPLM

·         Front end will use ABF shipping charge calculator on product page, order page: http://www.abfs.com/ecommerce/scc/
Requirement of the clients in the opencart and how I am going to tackle it and develop logic is glittering mind. Hope I will get the solution by brainstorming and searching if anyone who have already work in the abfs I will be very thankful