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
A2 Hosting features: Shared Turbo Boost, Managed Warp 1, Unmanaged Hyper 1, and Warp 2 Turbo


Active Member

Posts

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

Users browsing this forum: Bing [Bot] and 41 guests