Recently Viewed Products in Magento - magento

I want to be able to clear recently viewed products when I click on a link Clear Recently Viewed Products.
When customers login and view some products in Magento then Magento displays recently viewed products on the right side. I would like to add one link under that recently viewed products block which when clicked - it should remove/clear all the recently viewed products from that right block and it should show "There are no recently viewed product available" message there.
$_products = $this->getRecentlyViewedProducts();

Recently viewed products data are stored in this table report_viewed_product_index.
So simply you can delete those records based on customer_id.

Related

Magento Products are not visible in category after switching to multisite

I have recently switched to multisite functionality in magento which is working fine except one thing that I cant view product list in respective category ie. categories are displaying empty. however I can see the products individually but not in category. please let me know what is going wrong?
You need to check is, select products from product grid, click on Update Attributes, on the left hand side 'Websites' tab, check the website on which you want to upload products in. Then reindex the category products.

Magento: Assign all products to New store View after creating substore

I have main site and created multiple stores for different langues from magento admin.
Requirement - All categories and products need to be automatically displayed for new store.
Problem - All categories are displaying ok but all products are not displaying as these are displaying in main site. How can I achieve this?
What I have already done:
Magento version: 1.9
All categories and products need display on all stores
Multiple stores are created successfully
What else can I do?
Go to your manage products page, click select all, change the action dropdown to say "Change Attributes" and click submit. Then, on the websites tab, make sure your new site is checked in the "Add Product to Websites" area, and click save.

How to display products in home page which are created from a program in magento?

I created products using a controller in magento.The products are successfully created and are shown in list of products in Magento admin panel.But these are not shown in Magento home page.
But once I click on EDIT of these products and save them unchanged,they are shown on home page.
I am new to magento...
What might be the reason and how to overcome?
Thankyou,
First you need to flush all Cache you can do it form admin->system->Cache Management now click on "Flush Magento Cache" Button
secondly you need to Index you can do it form admin->system->Index Management
select all indexes and select reindex data and click on submit button now check your home page it should work.make sure your product should be in stock
and status = enable.

How to Clear recently viewed items (frontend user function) - Magento

Currently in the Magento cart there is a link button that clears the cart of its contents.
In a similar manner, I need to have a link button in the "Recently Viewed" panel that clears a user's recently viewed products list. I'm suspecting this needs to occur by somehow clearing the user's visitation cache - I'm unsure how Magento records and stores visited products.
Does anyone know of a way to do this in Magento?
If anyone has any suggestions on how I may do this, I'd be grateful.
(note this is not a question on how to clear the overall cache in the Magento admin)
Recently viewed products data are stored in report_viewed_product_index table.
you can delete these records based on customer_id/visitor_id

Magento Not Showing Products to Users who are Not Logged in

Using Magento CE 1.7, I have uploaded multiple csv files to create categories, create a lot of products, and assign the products to the correct category. I don't know when precisely it happened, but about two weeks ago I noticed that the category listings pages would stop showing the products on the front-end. I have spent nearly half of the development time for this project trying to get the category pages to consistently show the products.
Today I noticed that, again, the category pages no longer showed the products. Once again I logged into the admin section and double checked that the products were active, in stock, had qty and that the indexes were refreshed (I have turned off caching so this was not an issue). When none of the usual fixes worked, I carried on to my original task of the day. I logged into the members area and did my tweaks there. It was then that I went back to the category pages and found that the products were back. By logging in and logging out I could make the category pages show / hide the products. I have been through the admin section looking for an option that may hide a product from a non-logged-in user but am unable to locate one.
Why do my products not show when a user is not logged in?
Whilst going through through the customer groups section of the admin panel I noticed there was an entry for "NOT LOGGED IN" users. There was something suspicious with it, though. The ID was '5'. The other customer groups ascended from 1 to 3 and there was no entry with an id of 4.
My solution was to alter my database to set the id of the 'NOT LOGGED IN' customer group to 0:
UPDATE customer_group SET customer_group_id = 0 WHERE customer_group_code = 'NOT LOGGED IN'

Resources