I have only one product on my opencart and I want this product just to be in the homepage so that the customer will no longer go to any page just to buy the product. How can I make this product as default homepage? or How can I make the url default to the url of this product? I'm using opencart. I've tried to override the layout of the product but it didn't work. "Opencart Admin > Product > Porduct Page > Layout Tab > Override (Home)".
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
In the case of redirect the particular product page as home page is pretty good but you need to change the redirection URL while you are changing the product...
It is simple ->>>>>>>> $this->redirect($this->url->link('product/product', 'product_id=123'));
But just use featured Category in your home page...
Module->Featured->Limit & enable..
Product->edit(particular product)->special->leave price field and fix start date and end date...
System->design->layout->home->edit->add featured module in content top set priority 1
Both of these require you to edit your
/catalog/controller/common/home.php
and place the code after thepublic function index() {
line, changing 123 to your products idv1.5.x
v2.x + v3.x
If you want to show the homepage URL and display the product you can edit the
/index.php
file and add the following codeAdd it below the code
You will need to change the product_id to the id of your product. e.g.
$request->get['product_id'] = 12;
OpenCart 2.3
file catalog/controller/startup/seo_url.php after
insert
You will need to change the product_id to the id of your product. e.g.
$this->request->get['product_id'] = 102;