Post by motion2082 » Fri Aug 10, 2018 7:36 am

This is a bug report but I also wanted to share how I solved it in case anyone experiences the same thing

On OpenCart 3.0.2.0 running the Journal Theme when you go to a product page and click a product tag it returns a error 503 and can't complete the search request.

I fixed this by going to catalog/controller/product/product.php file on line 433 find 'tag='

Code: Select all

if ($product_info['tag']) {
                                                                $tags = explode(',', $product_info['tag']);

                                                                foreach ($tags as $tag) {
                                                                                $data['tags'][] = array(
                                                                                                'tag'  => trim($tag),
                                                                                                'href' => $this->url->link('product/search', 'tag=' . trim($tag))
                                                                                );
                                                                }
                                                }

and change it to 'search='

Code: Select all

if ($product_info['tag']) {
                                                                $tags = explode(',', $product_info['tag']);

                                                                foreach ($tags as $tag) {
                                                                                $data['tags'][] = array(
                                                                                                'tag'  => trim($tag),
                                                                                                'href' => $this->url->link('product/search', 'search=' . trim($tag))
                                                                                );
                                                                }
                                                }


Active Member

Posts

Joined
Tue May 12, 2015 8:48 pm

Post by rjcalifornia » Sun Aug 12, 2018 1:59 pm

motion2082 wrote:
Fri Aug 10, 2018 7:36 am
This is a bug report but I also wanted to share how I solved it in case anyone experiences the same thing

On OpenCart 3.0.2.0 running the Journal Theme when you go to a product page and click a product tag it returns a error 503 and can't complete the search request.

I fixed this by going to catalog/controller/product/product.php file on line 433 find 'tag='

Code: Select all

if ($product_info['tag']) {
                                                                $tags = explode(',', $product_info['tag']);

                                                                foreach ($tags as $tag) {
                                                                                $data['tags'][] = array(
                                                                                                'tag'  => trim($tag),
                                                                                                'href' => $this->url->link('product/search', 'tag=' . trim($tag))
                                                                                );
                                                                }
                                                }

and change it to 'search='

Code: Select all

if ($product_info['tag']) {
                                                                $tags = explode(',', $product_info['tag']);

                                                                foreach ($tags as $tag) {
                                                                                $data['tags'][] = array(
                                                                                                'tag'  => trim($tag),
                                                                                                'href' => $this->url->link('product/search', 'search=' . trim($tag))
                                                                                );
                                                                }
                                                }

You should report it to GitHub:

https://github.com/opencart/opencart/issues

I could not reproduce the error

Image


Active Member

Posts

Joined
Fri Sep 02, 2011 1:19 pm
Location - Worldwide
Who is online

Users browsing this forum: No registered users and 3 guests