Hello all,
I need to check if product was added to wishlist, add some css to wishlist button in product.tpl page..
Need your help please..
Regards
Add this:
Just above:
inside the ../catalog/controller/product/product.php
You can then use $in_wishlist as a test inside the template.
Should work. Obviously, this will only work for logged in users.
Code: Select all
if ($this->customer->getId()) {
$this->load->model('account/customer');
$customer_info = $this->model_account_customer->getCustomer($this->customer->getId());
$wishlist = unserialize($customer_info['wishlist']);
if (in_array($product_id, $wishlist)) {
$this->data['in_wishlist'] = true;
}
}
Code: Select all
$product_info = $this->model_catalog_product->getProduct($product_id);
You can then use $in_wishlist as a test inside the template.
Should work. Obviously, this will only work for logged in users.
-
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS
Who is online
Users browsing this forum: No registered users and 16 guests