|
Go to catalog/controller/product/category.php
Find
- Code: Select all
if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'pd.name'; }
Change to
- Code: Select all
if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.date_added'; }
Find
|
|
Read more...
|
|
After seeing a thread earlier asking how to reset their admin password I thought I'd create a little app that hopefully will be useful when people get stuck. It's taken from my Wordpress admin reset file I made a while back, with just a few tweaks to allow resetting OC passwords - It's actually taken me more time to write this post than to code it
|
|
Read more...
|
There is a solution, I don't know whether you'd call it "easy". In your top level language file (ie. "catalog/language/english/english.php"), insert the following:- - Code: Select all
$_['text_no_price'] = 'Coming Soon';
Then in the following files:-
catalog/controller/product/category.php catalog/controller/product/manufacturer.php catalog/controller/product/search.php catalog/controller/product/special.php catalog/controller/product/product.php
|
|
Read more...
|
|
I've had a few requests for this from people who have visited my dev site. Since this is not mine (it's something that was in version 0.7.7), I'm quite happy to post the necessary information to get it working.
You will need to edit the following files:– * catalog/controller/common/header.php * catalog/language/english/common/header.php * catalog/view/theme/default/template/common/header.tpl * catalog/view/theme/default/stylesheet/stylesheet.css
|
|
Read more...
|
|
I've launched a new online store using OpenCart and I've been researching ways to improve your website presence and performance on search engines both safely and effectively.
On-Site SEO 1. Home Title (title of your website) should reflect your main keywords
2. Use SEO-friendly URL [ie - http://www.example.com/white-denim-jeans instead of http://www.example.com/productid_9399]
|
|
Read more...
|
|
First, navigate to your phpMyAdmin page via cPanel or whatever alternative administration system your host provides i.e. Plesk etc. and log in. From the dropdown box on the left (or the text link) click on your OpenCart database to show all the fields. In the main page, click on the 'Export' tab. Make sure the main 'Structure' 'select all' and 'Data' boxes are ticked. In the right box, make sure 'Add drop table', 'Add AUTO_INCREMENT value' and 'Enclose table and field names with backquotes' are ticked. select the SQL format in the 'export' column'. Tick 'Save as file'.
|
|
Read more...
|
|
Objective Create 2 "sub" stores of your main store, called "store_1" and "store_2".
Assumptions XAMPP for Windows XAMPP installation directory: C:\xampp OpenCart Store directory: C:\xampp\htdocs\store Main Store URL: http://localhost/store
|
|
Read more...
|
|
OpenCart 1.x is a cart application built on top of its own in-house framework. The framework uses an MVC(+L) style design pattern. The +L isn't part of the pattern persay, but it is important to understand the localization and how text for different languages is used:
First off, OpenCart's root directory looks something like this: admin - the admin directory path is all the code on the front end of your site. This is completely separate from the catalog area and can even be stored on a different host if you prefer.
|
|
Read more...
|
|
I’ve been busy setting up a shop recently, but I’ve now started developing themes for OpenCart again. I’ve sorted out the problems with my post on how to add the Information module in the footer in OpenCart and have applied the same technique to add the Category module in the footer in OpenCart without editing the source code.
The principle is exactly the same as listing the Information in the footer. Firstly you need to load the category model. You can then run the getCategories function and output the results.
|
|
Read more...
|
|
If you use categories in the header in OpenCart as navigation, it helps with usability to highlight the parent, or top-level category of the page your user is on. Here’s how to list categories and highlight the parent category without any edits to the source code.
Following on from my previous posts about listing categories in the header and listing categories and sub-categories in the header in OpenCart, I thought I’d try to work out how to highlight the top-level category, just to finish the job I’d started.
It turned out to be reasonably easy.
If you are on a category page, or on a product page reached via a category, and you run $this->request->get['path'] it outputs the category path that you see in the URL. For example, if you are on a page with a URL like this: index.php?route=product/product&path=25_28&product_id=33 then $this->request->get['path'] will output “25_28″.
|
|
Read more...
|
|
By default, the search function in OpenCart is pretty limited and only searches product names. In Advanced Search there is an option to Search in product descriptions. Here’s how to make OpenCart search in product descriptions, and in all categories, by default.
If you are running a large shop with thousands of products you don’t want to search the product descriptions by default as it will take a long time. However, if you’ve only got a small or medium-sized shop you can give your visitors a better search experience by enabling search in product description by default.
|
|
Read more...
|
|
Basically, if you want to display a cart in your header you can put the following in your header.tpl file:
<div id="cart_in_header"> <?php $cart_number = $this->cart->countProducts(); if ($cart_number == 1) {echo "1 item in shopping cart";} else {echo $cart_number." items in shopping cart";} echo"<br />"; echo "Total: ".$this->currency->format($this->cart->getTotal()); ?>
|
|
Read more...
|
|
Q: What information do I need for UPS shipping? How to configure UPS shipping module?
A: The UPS extension uses an online rate lookup. This means it connects to the API that UPS offers to retrieve up-to-the-minute rates directly from their site, and then displays them on your cart during checkout. This ensures customers are paying exactly the right amount.
|
|
Read more...
|
|
Weight based shipping uses your own personal "table" rates to determine the shipping cost. It allows multiple ranges of rates based on different weights. The format of the weight to cost in the admin area is: weight:cost, weight:cost, etc
For example if you want to setup the following: Cart weight 10lbs or less cost $10 Cart weight 11-20lbs cost $15 Cart weight 21-40lbs cost $20 Cart weight more than 40lbs cost $30
read full article here |
|
|
Easy add a Slide Show to your OpenCart Store.
Features: - Unlimited number of Slides. - Each Slide can have it's own Link. - Links can open in New Window or Existing. - Choose Fade Duration. - Choose Slide Duration.
|
|
Read more...
|
|
ome of you may find this useful, especially for larger stores. It's just a very simple jquery scroll to top. As OC as jquery built in it only requires 2 steps.
Before the </body> and after the last div on the footer.tpl (depends on your theme) add:
read full article here |
|
How to hide Add to cart if price is negative and show cart if price is >= 0. If it's equal to 0 must show add to cart.
I've tried this in product.tpl:
<?php if ($price < 0 ) { echo "See related products"; } else { ?> <div class="content"><?php echo $text_qty; ?> <input type="text" name="quantity" size="3" value="1" /> <a onclick="$('#product').submit();" id="add_to_cart" class="button"><span><?php echo $button_add_to_cart; ?></span></a></div> <div><input type="hidden" name="product_id" value="<?php echo $product_id; ?>" /> <?php }?>
|
|
Read more...
|
|
Hello everyone. This is my first Contribution, and it's a small one. I have been playing with OpenCart for a few months now and have finally decided to build and launch a full website based on OpenCart. During my venture building the website so far, I wanted to integrate a Featured Content Slider like you see on my websites such as Crutchfield.Com and others. Being that OpenCart uses jQuery, there are a lot of options for this. I wanted a pretty basic one that would allow for as many images and links as needed and would load everything automatically. The actual script I used and tutorial can be found here: http://webdeveloperplus.com/jquery/feat ... jquery-ui/" onclick="window.open(this.href);return false;. For the purpose of OpenCart though, I am writing this contribution to help others integrate it.
|
|
Read more...
|
|
It is very rare that this will be needed. Even when you think you have to duplicate a module like "flat rate", it is actually best done using one of the zone based options like weight-based or zone plus.
But in any case, for those that are hell bent on duplicating existing sideboxes, payment, or shipping modules. This hi-level breakdown should get you going.
1. CHOOSE THE FILES First think of which module you new module is most similar too. In this example, we will make a clone of the "Cash on Delivery" payment module and name it "Cash on Pickup".
|
|
Read more...
|
|
I've been working with a few techniques over the past week to try and speed up the loading time of my site. Mostly working with Firebug + Google Page Speed.
You can also use: http://www.webpagetest.org to test your site too, for some more in-depth stats.
This is to make the user experience better and in anticipation of Google's recent announcement that page-loading-time will take more of a role in search results.
|
|
Read more...
|
|
This seems to plague a lot of people so I will try to make some GeoZones for Dummies notes here:
Glossary Country - A country entry in in OpenCart' Zone - a section of the land residing within the country. States, Territories, Provinces that belong to a country GeoZone - short for "Geographical Zone" and is a group of countries and/or zones that are in a user-defined area.
|
|
Read more...
|
|
How is OpenCart structured? / How do I add/change content on my site?
OpenCart uses a pseudo MVC architecture. You can learn more about MVC from google, but for OpenCart, the breakdown is like this:
There are 2 halves to OpenCart. "admin" & "catalog". It is pretty clear what each half does. But the best part about it, is that they both have the same functionality and structure. There is also a common file set between them called the "library". Files inside library are used to create the structures and globals needed for the rest of the cart, as well as handle any core functions.
|
|
Read more...
|
|
In trying to introduce a bit more flexibility into OpenCart I’ve realised that category pages are great for special promotions or themed pages in OpenCart. However, you may not want these promotional pages or themed pages to show up in your main navigation. Here’s how to exclude some categories from the main navigation in your header in OpenCart.
As an example, at this time of year you might have some products that you want to promote for Christmas. You could use a Category page to create a beautiful Christmas page and list your Christmas products there. However, you may prefer to promote this page on your home page with a big splash image and link to it from there, rather than have it appear in your main navigation, which you may want to keep the same all year round.
|
|
Read more...
|
|
Not being a programmer, it’s taken me a while, but I’ve started to work out how OpenCart works. So when I decided I wanted to try and put the Information details in the footer without editing any source code it wasn’t too hard.
Firstly you need to load the SEO URL tool (incase people are using SEO URLs, which they should be) and you need to load the Information language module (to allow for different language options). After that you can use the getInformations() function to access most of the Information module.
getInformations() doesn’t include “Contact Us” or “Site Map” for some reason, so you have to add them at the end. Apart from that, it’s pretty straightforward. Here’s the code:
|
|
Read more...
|
|
In an earlier post I detailed how to list categories in the header in OpenCart without changing any of the source files. I’ve now extended the script to list sub-categories.
Basically, the original script looped through all the top-level categories and put them in an unordered list. In this new script I’ve just repeated the loop within each top-level category. It loops through all the sub-categories of the top-level category (if there are any) and puts them in an unordered list too.
Please note that it will only output the top-level, and second-level categories. If you have third- and fourth-level categories you will need to repeat the loop again within each sub-category in order to list them. But, honestly, if you have third- and fourth-level categories in your shop I’d think about restructuring how you’ve ordered it.
|
|
Read more...
|
|
I’m working on a one column layout theme for OpenCart. This of course means that there are no sidebars at the left or right hand side so, as well as putting the cart in the header area, I needed to list the top level categories in the header. This is how I did it without editing the OpenCart source code.
|
|
Read more...
|
|
Q: Why do I get "Error: No shipping options available" when I checkout Why do I have no shipping options?
A: "Error: No Shipping options are available" can happen for a few reasons:
- No shipping modules are enabled or configured
- Shipping modules are not enabled for the customer geozone. See geozone help
- Shipping modules that use table rates either aren't set across the range that the product falls into.
read full article here |
|
How to configure USPS shipping module? A: The USPS extension uses an online rate lookup. This means it connects to the API that USPS offers to retrieve up-to-the-minute rates directly from their site, and then displays them on your cart during checkout. This ensures customers are paying exactly the right amount.
|
|
Read more...
|
|
Shipping extensions can be created by cloning an existing one that does something similar to what you want.
For Example, If you want to make DHL shipping rates mod using live rate lookup from the DHL site, I would start with the existing UPS shipping extension. If creating a special case scenario based on static table rates, then try cloning the weight based shipping. For this example I will use the UPS files for a new DHL extension.
|
|
Read more...
|
|