Post by blockergroup » Tue Apr 17, 2012 5:25 am

Hello,
I would like to find out if it is possible to view the "wish list" without logging in to an account.
Currently, you can add items to the wish list without logging in, but when you click on the wish list link located in the header, that shows the total of items in your wishlist, you are prompted to login.
If the wishlist is saved in cookies and not in the database, isn't this possible?
thank you in advance for any help you can provide.
regards,
RB

Newbie

Posts

Joined
Sun Apr 15, 2012 2:31 am

Post by NooBisH » Thu Nov 15, 2012 10:28 pm

Hi,
This is possible.
On: 1.5.2.1 catalog/controller/account/wishlist.php
-----------------------------------------------------------------------
Find and delete:
---------------
if (!$this->customer->isLogged()) {
$this->session->data['redirect'] = $this->url->link('account/wishlist', '', 'SSL');
$this->redirect($this->url->link('account/login', '', 'SSL'));
}
-----------------------------------------------------------------------
Find:
---------------
if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {
$price = $this->currency->format($this->tax->calculate($product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax')));
} else {
$price = false;
}
-----------------------------------------------------------------------
And change:
---------------
$price = $this->currency->format($this->tax->calculate($product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax')));
-----------------------------------------------------------------------
Find:
---------------
if ($this->customer->isLogged()) {
$json['success'] = sprintf($this->language->get('text_success'), $this->url->link('product/product', 'product_id=' . $this->request->post['product_id']), $product_info['name'], $this->url->link('account/wishlist'));
} else {
$json['success'] = sprintf($this->language->get('text_login'), $this->url->link('account/login', '', 'SSL'), $this->url->link('account/register', '', 'SSL'), $this->url->link('product/product', 'product_id=' . $this->request->post['product_id']), $product_info['name'], $this->url->link('account/wishlist'));
}
-----------------------------------------------------------------------
And change:
---------------
$json['success'] = sprintf($this->language->get('text_success'), $this->url->link('product/product', 'product_id=' . $this->request->post['product_id']), $product_info['name'], $this->url->link('account/wishlist'));

Newbie

Posts

Joined
Thu Nov 15, 2012 10:21 pm

Post by CristinaBaboon » Wed Jul 29, 2020 8:54 pm

Hey, i have the same problem for opencart 3.0.3 but i do not have the same code section on my /...../catalog/controller/account/wishlist.php.


Posts

Joined
Mon Mar 30, 2020 4:56 pm
Who is online

Users browsing this forum: No registered users and 16 guests