Posts

Showing posts from April, 2011

funny songs by sakaira Prank

Image
funny songs by sakaira

Running Competition By Berni funny cartoon

Image
Funny running competition of the berni carton

Errors Solved in the CSV import/export of opencart

Dear Rupak I have a similar error to ialiendre's when I click on the export button: Error: Table 'opn_j262cjfa6g.product' doesn't exist Error No: 1146 SELECT * FROM `product` p inner join product_description pd on pd.product_id=p.product_id Are you able to help me? I'm running v1.4.9.4 . Thanks & best regards -============================================= The tip is that i forget to place the database prefix. Change the following code At model/tool/csvproduct.php replace with the codes $query = "SELECT * FROM `". DB_PREFIX ."" . $table . "` p inner join ". DB_PREFIX ."product_description pd on pd.product_id=p.product_id"; at line no 21 or something like the $query $query15 = "SELECT * from ". DB_PREFIX ."product_to_category ptc inner join ". DB_PREFIX ."category_description cd on cd.category_id=ptc.category_id where ptc.product_id=". $row['product_id']; at line number 85 or something

Best Cycling trick ever done by Berni

Image
funny cartoon of berni, rupak nepali berni

Want to play Golf with the Berni

Image
Watch out how Berni Play golf, one of the most hilarious cartoon on the glof

Decrypt Your code

Want to decrypt the code then visit the site above. How do i decrypt the php code? How do i use the decryption of the code? For all the above question the answer is Visit the site below: http://www.region59.net/unlockit/decoder.php This service is designed to decrypt php-scripts that have been processed by the program SourceCop. Do not use this service to remove the protection to commercial products and for any similar actions which violate the copyright of third parties. Author services shall not be liable for the performance of the decoded scripts, as well as for any damage caused by their use.

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

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

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">&l

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 t

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

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

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

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

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

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 http://www.abfs.com/ecommerce/?NCHK=STAB ·          Utilize combination of ABF Transparent Direct Links : http://www.abfs.com/ecommerce/tlinks/ for backend and frontend integration

Collection of Opencart Module

Free opencart Module download extension dead cow extension for SEO http://www.opencart.com/index.php?route=extension/extension/download&extension_download_id=39962 calculator extension module for opencart http://www.opencart.com/index.php?route=extension/extension/download&extension_download_id=38546 Sliding of brands module http://www.opencart.com/index.php?route=extension/extension/download&extension_download_id=38303 latest product slideshow http://www.opencart.com/index.php?route=extension/extension/download&extension_download_id=38302 You tube Video integration module http://www.opencart.com/index.php?route=extension/extension/download&extension_download_id=34422 Rss Feed http://www.opencart.com/index.php?route=extension/extension/download&extension_download_id=32809 Module to show module in the tab form http://www.opencart.com/index.php?route=extension/extension/download&extension_download_id=31387 For next and previous sowing of the opencart http://ww

About the configuration class in the opencart

config: config consists of 5 functions and they are as follows: get($key): $this->config->get('welcome_text_position'): is the example that check whether the data is set or not if it is not set then it will return null. public function get($key) { return (isset($this->data[$key]) ? $this->data[$key] : NULL); } set($key, $value): This is used to set the value and is done by $this->config->set($key, $value) public function set($key, $value) { $this->data[$key] = $value; } has($key): Check whether there is key available or not. public function has($key) { return isset($this->data[$key]); } load($filename): This is the function which loads the file that the parameter is passed. If it does not find the file then it will return the error message saying ‘Error: Could not load config filename’ public function load($filename) { $file = DIR_CONFIG . $filename . '.php'; if (file_exists($file)) { $cfg = array(); require($file); $this->data = array_merge

About the currency function on the opencart

currency: set($currency): Set the currency to be used in overall site. public function set($currency) { $this->code = $currency; if ((!isset($this->session->data['currency'])) || ($this->session->data['currency'] != $currency)) { $this->session->data['currency'] = $currency; } if ((!isset($this->request->cookie['currency'])) || ($this->request->cookie['currency'] != $currency)) { setcookie('currency', $currency, time() + 60 * 60 * 24 * 30, '/', $this->request->server['HTTP_HOST']); } } format($number, $currency = '', $value = '', $format = TRUE): public function format($number, $currency = '', $value = '', $format = TRUE) { if ($currency && $this->has($currency)) { $symbol_left = $this->currencies[$currency]['symbol_left']; $symbol_right = $this->currencies[$currency]['symbol_right']; $decimal_place = $this->curren

Collection of customer function and its description in Opencart

customer: login($email, $password): Check whether the customer is approved and check whether the username and password is correct or not. public function login($email, $password) { if (!$this->config->get('config_customer_approval')) { $customer_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "customer WHERE LOWER(email) = '" . $this->db->escape(strtolower($email)) . "' AND password = '" . $this->db->escape(md5($password)) . "' AND status = '1'"); } else { $customer_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "customer WHERE LOWER(email) = '" . $this->db->escape(strtolower($email)) . "' AND password = '" . $this->db->escape(md5($password)) . "' AND status = '1' AND approved = '1'"); } if ($customer_query->num_rows) { $this->session->data['customer_id'] = $customer_qu

Collection of database function and its description in Opencart

db: query($sql): $this->db->query(“Select * from product”); This returns all the product available in the database public function query($sql) { return $this->driver->query($sql); } escape($value): public function escape($value) { return $this->driver->escape($value); } countAffected(): public function countAffected() { return $this->driver->countAffected(); } getLastId(): Last affected or inserted or deleted Id is returned. public function getLastId() { return $this->driver->getLastId(); } collection of database function and its description in opencart, collection of database functions, function opencart, database library function on the opencart, how to get the latest inserted id of the product?,how to find the last inserted customer id?

Cart in the opencart

Cart: Functions that are in the cart library of opencart are: $this->cart->getProducts(): This is the line which is used for getting the products that are in the cart. public function getProducts() { $product_data = array(); foreach ($this->session->data['cart'] as $key => $value) { $array = explode(':', $key); $product_id = $array[0]; $quantity = $value; $stock = TRUE; if (isset($array[1])) { $options = explode('.', $array[1]); } else { $options = array(); } $product_query = $this->db->query("SELECT *, wcd.unit AS weight_class, mcd.unit AS length_class FROM " . DB_PREFIX . "product p LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id) LEFT JOIN " . DB_PREFIX . "weight_class wc ON (p.weight_class_id = wc.weight_class_id) LEFT JOIN " . DB_PREFIX . "weight_class_description wcd ON (wc.weight_class_id = wcd.weight_class_id) LEFT JOIN " . DB_PREFIX . "length_c

Captcha in the Opencart

Image
Captcha: How to load the captcha: In the controller we have to insert the code: public function captcha() { $this->load->library('captcha'); $captcha = new Captcha(); $this->session->data['captcha'] = $captcha->getCode(); $captcha->showImage(); } In the template file: Captcha contains only two function and they are below: getCode(): This will generate the code that will be displayed in the image of the captcha. function getCode(){ return $this->code; } And showImage(): This will generate the image with the code to show the captcha in the front end. function showImage() { $image = imagecreatetruecolor($this->height, $this->width); $width = imagesx($image); $height = imagesy($image); $black = imagecolorallocate($image, 0, 0, 0); $white = imagecolorallocate($image, 255, 255, 255); $red = imagecolorallocatealpha($image, 255, 0, 0, 75); $green = imagecolorallocatealpha($image, 0, 255, 0, 75); $blue = imagecolorallocatealpha($image, 0, 0, 255, 75);

Opencart Cache library function

Opencart Cache library function: Calling of the cache function from the controller or view or model $this->cache->get($key); This is useful to get the caches that are enabled. The get function in the library is defined as follows: public function get($key) { $files = glob(DIR_CACHE . 'cache.' . $key . '.*'); if ($files) { foreach ($files as $file) { $handle = fopen($file, 'r'); $cache = fread($handle, filesize($file)); fclose($handle); return unserialize($cache); } } } $this->cache->set($key, $value): This is useful to enable the cache. The function set is defined as below: public function set($key, $value) { $this->delete($key); $file = DIR_CACHE . 'cache.' . $key . '.' . (time() + $this->expire); $handle = fopen($file, 'w'); fwrite($handle, serialize($value)); fclose($handle); } $this->cache->delete($key): This is useful to delete the cache by which we can enable the next cache by setting. The function delet

Time to change the word that we speak

Image
Friends it's time to change the words. Let me give example: If son wants to take a high costing training then If father says "I can't afford it." Then it is statement which stop peple to think. But if he says "How can I afford it?" Then it is question by which the son start to think or activate the mind.

Collection of library function in the opencart by Rupak Nepali

These are the library name that we can get in the opencart cache, captcha, cart, config, currency, customer, db, document, encryption, image, json, language, length, log, mail, pagination, request, response, session, tax, template, user, weight How we can use the library: $this->cache->function_name_available(); List of function name in the respective category: Cache:     $this->cache->get($key);     $this->cache->set($key, $value):     $this->cache->delete($key): Captcha: Captcha contains only two function and they are below: getCode(): showImage(): Cart: Functions that are in the cart library of opencart are: $this->cart->getProducts(): add($product_id, $qty = 1, $options = array()): update($key, $qty): remove($key): clear(): getWeight(): setMinQty(): getSubTotal(): getTaxes(): getTotal(): countProducts(): hasProducts(): hasStock(): hasShipping(): hasDownload(): config: config consists of 5 functions and they are as follows: get($key): set($key, $value):