Hi everyone.
Been messing around with opencart Version 1.5.1.3 and was wondering, how do I make it so that if I have just one product under a main parent category, the link for that parent category goes straight to that single product instead of a page that makes the user have to click on the product to get to it?
I really hope that makes sense
Chunk
Been messing around with opencart Version 1.5.1.3 and was wondering, how do I make it so that if I have just one product under a main parent category, the link for that parent category goes straight to that single product instead of a page that makes the user have to click on the product to get to it?
I really hope that makes sense
Chunk
Hi sirchunk,
Your post makes sense.
We discussed this before http://forum.opencart.com/viewtopic.php?f=19&t=29768
Simon at uksitebuilder was going to look into this but I think he has been busy with other maters.
Maybe he or someone can help with this.
As Qphoria says other carts have this feature.
Your post makes sense.
We discussed this before http://forum.opencart.com/viewtopic.php?f=19&t=29768
Simon at uksitebuilder was going to look into this but I think he has been busy with other maters.
Maybe he or someone can help with this.
As Qphoria says other carts have this feature.
Harleybill
http://spaparts1.com
Sorry for the delay on this guys
edit: catalog/controller/product/category.php
Find:
Replace with:
edit: catalog/controller/product/category.php
Find:
Code: Select all
foreach ($results as $result) {
if ($result['image']) {
Code: Select all
foreach ($results as $result) {
if($product_total == 1){
$this->redirect($this->url->link('product/product', 'product_id='.$result['product_id']));
}
if ($result['image']) {
Hi Simon,
There are a few people on the forum you can always count on, and your one of them.
This is something that should be in the core. It works great.
I just sent you a donation.
It's less than what it is worth but I hope everyone that uses this will send you some thing.
Thanks,
Harleybill
P.S. Sorry for your recent loss.
There are a few people on the forum you can always count on, and your one of them.
This is something that should be in the core. It works great.
I just sent you a donation.
It's less than what it is worth but I hope everyone that uses this will send you some thing.
Thanks,
Harleybill
P.S. Sorry for your recent loss.
Harleybill
http://spaparts1.com
When I applied this and the redirect was used, the breadcrumb trail was lost so I made a change to the redirect line to keep the breadcrumb trail on the product page.uksitebuilder wrote:Sorry for the delay on this guys
edit: catalog/controller/product/category.php
Find:Replace with:Code: Select all
foreach ($results as $result) { if ($result['image']) {
Code: Select all
foreach ($results as $result) { if($product_total == 1){ $this->redirect($this->url->link('product/product', 'product_id='.$result['product_id'])); } if ($result['image']) {
Find:
Code: Select all
foreach ($results as $result) {
if ($result['image']) {
Code: Select all
foreach ($results as $result) {
if($product_total == 1){
$this->redirect($this->url->link('product/product', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id']));
}
if ($result['image']) {
Google Analytics Expert - Advanced e-commerce tracking, Product & options reporting, transaction/conversion reporting, Google Adwords conversion & profit reporting, goal & funnel reporting, event tracking, site search tracking, multi-store compatibility, EU Cookie Law compliance and works with any theme or checkout! Easy vqmod install. Get it here
Who is online
Users browsing this forum: No registered users and 72 guests