Add page number in page title - magento - magento

Have one issue which don't like google for seo.
All the categories having the same title if going by pages in that category, so I want to add page number in page title. Is any solution?

Copy file from /app/code/core/Mage/Page/Block/Html/Head.php to app/code/local/Mage/Page/Block/Html/Head.php modify with the following code which is getting default page number.
Mage::getBlockSingleton('page/html_pager')->getCurrentPage();

Related

adding product listing on magento homepage with description

I need to show my new products on the home page as a list view. I have used a Magento widget, but it is not returning the description of the product. How can I fetch the whole details of the product in the home page as shown in the image below?
First find out(template hint) the file from where your widget is rendering products. It's located in app/design/frontend/<yourpackage>/<yourtheme>/template/catalog/product/widget/new/content/new_grid.phtml/new_list.phtml
Go look in that file, you will see how and what values are the widgets printing. So if you want description within the foreach loop you can get by printing $_product->getShortDescription() or $_product->getData('short_description')
Similarly to get other stuff like in list page, please take reference from template/catalog/product/list.phtml see how the other details are being printed and get those here on widget phtml file.

Display set of user chosen categories on magento home page

I am trying to display categories on magento home page. I know how to do it in a normal way using magento collections. I want to have it like a widget, if you insert a category link widget in static block or cms page, you can see the following:
{{widget type="catalog/category_widget_link" template="catalog/category/widget/link/link_block.phtml" id_path="category/3"}}
Now, here the id_path indicates which category to display. Can we modify it somehow to show a list of specified categories. For example like this: id_path = '3,4,5,6' so it will display all these specified categories. Can anybody guide me a way to do this? I don't know much about widget coding stuff in magento.
You can add as many as widgets inside the static block by selecting the widget as many as times you want.

Magento homepage site title for 11 different websites

I have a multi-store Magento installation for 11 different domains all selling the same product but targeting different countries, currencies and languages.
I have one CMS homepage at the moment set with content being pulled in with static blocks and a featured category. The title for all 11 websites is 'Home Page' in english.
I want to be able to change the meta title of each site, is there a way I can do this without having to create 11 separate CMS homepages in the admin and then assigning each website to it's specific CMS page? It seems overkill to have to create a separate page to change just change one line on each website.
The title, meta-keywords and meta-description are added to the page from here: Mage_Cms_Block_Page::_prepareLayout(), to be more exact, on these lines:
if ($head) {
$head->setTitle($page->getTitle());
$head->setKeywords($page->getMetaKeywords());
$head->setDescription($page->getMetaDescription());
}
I see here 2 quick options:
You override the method mentioned above and replace $head->setTitle($page->getTitle()) with $head->setTitle($this->__($page->getTitle())) and add to your translation files the translation of Home page for every language.
You override the method Mage_Cms_Model_Page::getTitle() and make it return a translated version of the title then again add Home page to your translation files.
I recommend the first option.
If you have 11 sites all selling the same item, duplicate content could very well become an issue, especially if you are dealing with hundreds+ skus. I would suggest doing the individual CMS pages like you first suggested and change more than just the META data.
Also, in System>Configuration>Design, you can change the Title Prefix and Suffix and default info per site so that may help as well.

Magento product details page not loading after search result

In my magento website, whenever i am trying to view the product details page from search result (means product list is generated from the search query) its not loading the product details page properly. After the breadcrumbs its not displaying anything.The sample url is given below.
https://www.example.com/index.php/test.html
And the breadcrumbs is displaying like Home/test.html
If I go the category page and view the same particular product then it shows perfectly with below url.
https://www.example.com/index.php/category1/test.html and breadcrumbs looks like Home/category1/test.html.
Any help will be greatly appreciated.
Truncate the url_rewrite table.
Delete all files from var/locks.
Reindex and i think it should work.
Actually problem was on my catalog/product/view.phtml page. I have a magento store with 30k products and I have used a theme which have functionality to displaying Pre/Next product in details page for this details page was taking lot of time to execute. I have just removed the pre/next functionality from catalog/product/view.phtml page and it works fine.I have also truncated the core_url_rewrite table and Reindex Catalog URL Rewrites.

How to list the categories of the current store?

I have a site which have 2 store views. I want a page to list the categories of the current store and when I click on a category it should display all of the products in that category in a list.
Any who can give some idea about this?
That page already exists by default in Magento. It is probably a link in the page footer as "Site Map", or you can reach it directly by typing the URL of the store followed by /catalog/seo_sitemap/category

Resources