Magento product review visible in every language - magento

A product review is not visible in another language. How can I enable that for an other store-view with the same products?

You have to go into the review and set the store views it is visible in when you approve it. To update them all quickly you can do it with a sql update directly on the database. Would mean an english review would be visible in english on say a spanish store view though.

Review for all store views:
Export all review_id of review_store table. Add store_id to each review_id. You can do it manually using the editor Sublime (Select all lines and using Ctrl+Alt+L do edit all lines at once)
Insert back into the table. Example of SQL:
INSERT IGNORE INTO review_store (review_id, store_id) VALUES
(9,1),
(9,3),
(9,4),
(9,5),
(9,6),
(9,7),
(9,10),
(9,11),
(9,12),
(14,1),
(14,3),
(14,4),
(14,5),
(14,6),
(14,7),
(14,10),
(14,11),
(14,12),
...
On Magento Admin:
Setup rating for the new store view. ( Catalog > Manage Ratings > Click on each rating and setup the rating visibility for each store)
On the list of all reviews, select all "Approved" reviews, and change status to "Approved" ( this is just to save the reviews and generate the rating summary)

Related

delete sample products in Magento 2 but maintaining sample categories and luma layout

I want to delete the sample products, orders, customers and invoices but maintain the categories and also the layout. I'm using Magento 2.
Any way to do that easily or should I just delete them one by one?
Thanks
For delete sample product
Login to Admin, then go to
Product -> Catalog
select check box of the product, then click the action drop down then click delete.
if you want to delete all, select all and then delete
For delete Customers
Customers->All Customers
select all customer then delete
For delete order&invoice
The Default Magento only allows changing order status into cancel for any completed order or test order without deleting.
use magento 2 exetnsion, if you want delete order
for example
https://www.magecheckout.com/magento-2-delete-order-extension.html
have a good luck

how to add bulk category assign option in update product attribute Magento

HI i need to assign multiple products a same categories. I have check that under update product attributes in admin but unfortunately there is no option for this. There.
Can any body suggest me how can i add that functionality in admin.
please check this screen-shot
http://awesomescreenshot.com/0a92v48t1b
http://awesomescreenshot.com/09a2v4id8c
"i need to assign multiple products a same categories."
If you want to do this. you have to go to category edit.
Catalog -> Manage Categories
Select a category
Click on Category Products tab (on top)
On very first column select any (there you see Yes, No and Any option)
Click on Search. You will see list of products.
Select products to assign to that category.
I recently wanted to bulk change / replace the category of products (with or without an existing category) to a new category "Expired". I created a CSV with the following fields:
sku,_store,_category
194337,,Expired
106025,,Expired
I then used System > Import and for Import Behaviour selected "Replace existing complex data". Select your csv file and away you go. Remember a re-index is required.
If you wish to wanted to bulk add a first or further category to products, create the same file as above but for Import Behaviour select "Append complex data". I.e. if a product had been in Category: "TVs" and you use "Append complex data" with the above file, it would now be in both Categories: "TVs" and "Expired".

magento link product to specific store view

I have 6 languages defined using store views.
i have 6 simple products - one product for each language.
I did not create those products using attributes or configurable product or so, since this is the main product in my store and i would like to promote the product in each language separately.
now, I try to link a productX to default store view X (means if someone clicks to view that product, he will move to the store view with the language of the product.
example:
- store view_EN
- store view_IT
product X_EN
product X_IT
being in store view_EN, clicking product x_IT should redirect to store view_IT/product X_IT...
is that possible with little tweaks only?
thanks!
First of all, you don't need 6 different products, one for each language. You can have the same product, and translate the text fields to all the languages (like name, description, short description, ...).
You can do that by changing the scope from the top-left dropdown on the product edit page, in admin.
Now here is how you can get a product url for a specific store. Let's say that the product id is $productId, and the store id is $storeId
$url = Mage::getModel('catalog/product')->setStoreId($storeId)->load($productId)->getProductUrl()

Magento - remove all special prices

I need to remove all special prices in my magento stores and I can't understand a thing about magento's database structure when I look into phpMyAdmin.
Can someone guide me?
Thx.
There's an easy way around to remove all the special prices from all products. You don't actually need to run any script. Just go to the administration -> catalog -> manage products and click on select all at the top left of the grid view. Then, in actions dropdown on the top-right, select Update Attributes and press Submit.
See the screenshot below:
Now, in the Update Attribute Screen, scroll down to Special Price field, and check the Change checkbox. DO NOT put anything in the text box. Click on save.
See the screenshot below.
It might take a while if you have many products, but it will work without disturbing your database. Once done, go to Index Management and Re-index everything.
You have 2 ways of resolving this:
1) Look more at the Magento database, It uses several tables to map prices etc. As well as a single flat table if you have that enabled. To update all prices you need to look for the special price value in the varchar table, Take that ID and update its parent.
2) Create a PHP script that will load all products and loop through and update the values you want. Basic code would be:
// inside a loop
$product->setSpecialPrice(0);
$product->save();
An easy way to debug what SQL you need is to enable MySQL logging, Save a product and see what tables are being wrote to. Or even in the product catalog save event add an echo to the Entity after save to print out the generated SQL.
If you want to remove special price then create csv file for import and add blank valspecial price field using SKU and import that csv. Its remove all special prices.
Direct from database.
Before execute bellow query export and keep backup "catalog_product_entity_decimal" table.
execute bellow query.
DELETE from catalog_product_entity_decimal where attribute_id in (
select attribute_id from eav_attribute where attribute_code =
'special_price');
You can just select fields blank and save changes then all special prices will be remove.
image attached here
The Question is why you need to remove them? You could also hide them using CSS, quick and easy but once again... you should evaluate this need and solution! Hope it helps!

magento set subcategory as rootcategory

I have 1 magento installation with 2 websites. i want to set a subcategory from website 1 as rootcategory of website 2.
and i don't know the id of the category, because this is local and has to work on production with other categories. So i can't set the id of the wanted category in code.
it must be adjustable in the backend.
in system->manage stores-> select a store
here you can set the rootcategory but there are no subcategories available.
is the only solution to build a module to select the id of the category?
copy
app/code/core/Mage/Catalog/Model/Resource/Category/Collection.php
to
app/code/local/Mage/Catalog/Model/Resource/Category/Collection.php
update around line 414
$this->addLevelFilter(1);
to
$this->addLevelFilter(2);
What this will do is when you go into System -> Manage Stores and click on the Store Name.
It lets you set the Root Category. This dropdown will now not only display the root categories but also the level 2 categories. It's perfectly fine to use a subcategory as the root category in a certain store.
This is really beneficial if you're running a corporate site and then a bunch of branded sub-sites but you don't want to manage a million different duplicate categories.
I understand what it is you're trying to do but not why. Are you trying to display specific categories for each Store View? You don't have to worry about Root Category to solve this.
I'll assume you're using a newer version of Magento Community Edition 1.5+.
Leave the category for both Store Views set to the same Root Category
(default is Default Category)
Go to Catalog > Manage Categories.
For each website you will need to enable/disable each subcategory to
build a custom catalog from the Root Category.
Above the category listings you can switch which Store View you need to customize. Leave this set as "All Store Views" and customize which subcategories you want or don't want for Website 1.
To do this just click on the specific category > General Information tab and set the Is Active to Yes or No. Disabled categories will grey out.
Once completed switch to the Store View of the other website "Website 2" and select a category that will be different than the default.
Now, to the right of the various fields you will see a checkbox (checked by default) labeled Use Default Value.
Uncheck the Use Default Value checkbox beside the Is Active field and toggle it to yes/no.
Save Category.
Now when you view each store you will see that the catalog is different.
Does this solve your issue?

Resources