OpenCart 1.5.6; Theme: Default.
I've created a new module 'Seller' cloned by 'Manufacturer' ... Admin side & Front side is working okay, means adding / editing / saving data is working okay, except an issue.
When I click on 'Seller' link at product page (frontend), it shows 404 error / page not found, ideally it should work same as Manufacturer module works, should open seller's page with list of products by the same seller.
What could be the reason? Because I don't see any error in log files / VQMOD, it just shows 404 error.
Any clue?
Probably this happened here:
Let's assume Your seller URL is http://my.domain.com/index.php?route=product/seller&seller_id=1
.
Now the route
part product/seller
tries to load this controller file:
catalog/controller/product/seller.php
^^^^^^^^^^^^^^
and while there is no action specified (which would be e.g. product/seller/showList
) the index
action is called. This all means, that You need to have the above mentioned file, which has to contain a class ControllerProductSeller
extending from Controller
and this class has to have method index
implemented.
This would look like
class ControllerProductSeller extends Controller
{
public function index()
{
// ...
}
// ...
}
After this is fulfilled You should not receive a 404 error.
I can see You are completely new to OpenCart and new modules creation (reminds me of my starts) and my advice is: look and discover how the things in OpenCart are done, copy+paste+rename wisely. Most of errors like this (and missing template, language, model files, undefined method names etc) are caused by improper renaming, or in other words, by hot head and quick fingers... Slow down and start thinking a little bit about what are You doing and what needs to be done.