Post by dani888 » Sun Apr 01, 2018 8:39 pm

Hello
I installed this module
https://www.opencart.com/index.php?rout ... load_id=55
Versiune opencart 3.0.2.0
very well but I do not know how to give two continue shopping and checkout buttons
Maybe someone can help me
Thanks

Active Member

Posts

Joined
Wed Feb 14, 2018 1:47 am

Post by straightlight » Sun Apr 01, 2018 10:07 pm


Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by dani888 » Sun Apr 01, 2018 10:54 pm

Hello
We have modified the following code as in the example
I installed modules this one
https://www.opencart.com/index.php?rout ... load_id=55
Nothing has changed
the module works without the two buttons
Maybe something needs to be modified
Thank you

No OC version posted. However, it can be done. Followed is for v3.0.2.0 release:

In catalog/controller/checkout/cart.php file,

find:

Code: Select all

$product_id = (int)$this->request->post['product_id'];

add below:

Code: Select all

$this->session->data['product_id'] = (int)$product_id;

Then, find:

Code: Select all

$data['continue'] = $this->url->link('common/home');

replace with:

Code: Select all

if (!empty($this->session->data['product_id'])) {
$data['continue'] = $this->url->link('product/product', 'product_id=' . (int)$this->session->data['product_id']);
} else {
$data['continue'] = $this->url->link('common/home');
}

Then, in catalog/controller/product/product.php file, find:

Code: Select all

$this->load->model('catalog/manufacturer');

add below:

Code: Select all

if (!empty($this->session->data['product_id'])) {
unset ($this->session->data['product_id']);
}

This should resolved the issue.

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight

Active Member

Posts

Joined
Wed Feb 14, 2018 1:47 am

Post by straightlight » Sun Apr 01, 2018 11:45 pm

Since you're using an extension, contact the extension developer to integrate what you need. You can also clear your OC cache from the OC admin by following this post noticing the changes after implementing the steps from the above post: viewtopic.php?f=176&p=718325#p718325

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by dani888 » Mon Apr 02, 2018 12:19 am

I turned off the module I updated and it works
Still have to add style to have buttons
Thanks for the change I'm glad someone is helping us

Active Member

Posts

Joined
Wed Feb 14, 2018 1:47 am
Who is online

Users browsing this forum: No registered users and 349 guests