Magento product availability - magento

I need some help tracing back a change i made early on when learning Magento.
On the product page i've removed the part that would normally display the availability, either "In Stock" or "Out of Stock".
I've checked the /catalog/product/type/default.phtml and i've not commented this section out, which seems to be the usual way of fixing it.
I seem to recall i changed something in the admin panel but buggered if i can find anything relating to this.
Can anyone advise on tracing the function back? i presumed it should be seen in /catalog/product/view.phtml but i cannot see anything in there for my template or the base template.
Magento version 1.7.0.2
Forever greatful if anyone can help me figure out what i've done!
Thanks,

May be you have deleted this line from your view.phtml file
<?php echo $this->getChildHtml('product_type_data') ?>
this in turn call this block
<block type="catalog/product_view_type_simple" name="product.info.simple" as="product_type_data" template="catalog/product/view/type/default.phtml">
This is responsible for display stock message on product page.

Related

Static block not showing up in CMS page

I just started working on magento/admin. I am trying to show my static block in one of my CMS pages, but it is not working. I tried to find out answer in google and stack exchange but no luck! Can anyone please help.Thanks.
Below are details:
This is my static block
This is my CMS page: I am able to see the text "Yes!" though.
Final output: That blue box is my CSS. (jfyi).
If you use the latest Magento version 1.9.2.2 that includes the latest patches, then you need to add first the block to Magento white list in teh backend: System->Permissions->Block.
See this article: http://www.dudesquare.nl/blog/2015/10/31/static-block-shortcodes-not-working-1-9-2-2/
Please set different identifier in static block than CMS page. I think CMS page and block identifier same so may be block not display on CMS page.
Also select all store views in static block may be your store is wrong.
And finally remove all cache and refresh all index.
Please check following:
Whether you had editor enabled, while calling static block. If yes, please click on Show/Hide Editor button and check what code is there in text area while editor mode off.
If above does not work, then go to System >> Configuration >> Advanced (Developer) and under Log Settings, Enable Logs. Then refresh cms page in frontend.
I hope this will help you resolve your issue. Please let me know if you find any problem.
Try to add static blocks through Layout Update XML in CMS Pages use something like this code. Add this code in your CMS page design tab.
<reference name="content">
<block type="cms/block" name="block.name">
<action method="setBlockId">
<block_id>block_id</block_id>
</action>
</block>
</reference>
Solution:
Step 1)Go to admin.
Step 2)Open Top menu System->Permissions->Blocks.
Step 3)click "Add New Block".
write your "Block Name" and Is Allowed "Yes".
Note: Block Name is type of your block for example "cms/block"
after Save Block.
Step 4)Clear cache and refresh front page. Now Block is showing.
Done.

Unable to get category products on home page

We are using a buyshop theme from magento and trying to list a few products from every category on the home page by the following code:
{{block type="catalog/product_list" category_id="2" block_name="Bestsellers" template="izotope/products_from_category.phtml"}}
The category above has more than 2000 products, however, nothing comes up. The normal category view via the menu works perfectly fine.
Also, tried using the default magento (1.9.2.2) code as shown below with no success
{block type="catalog/product_list" category_id="your_category_id" template="catalog/product/list.phtml"}}
The same thing works perfectly fine on the localhost, however, we are unable to figure out any reason for such behavior.
We believe that it has nothing to do with the theme, it is something we are just not aware of or is probably disabled. We have tried everything including:
a. Clearing the cache
b. Checking the product status whether enabled and whether product is in stock
c. Checking whether the product is inside the category and the default store view
.....and many more small things but with no success.
Any help would really be appreciated.
Try this
{{block type="catalog/product_list" column_count="4" category_id="2" block_name="home.catalog.product.list" template="izotope/products_from_category.phtml"}}
You have to set permission for that block
Open Admin >> System >> Permissions >> Blocks >> Click on Add New Block Button
after that in Block Name filed add your block name = catalog/product_list
and set Is Allowed = Yes
click on save block button.
after that
add your cms code in cms page or static block it work fine
If it work for you then vote it up
It seems that it was because of some theme based element. I deleted the theme and tried the default theme and was working as intended.
Just finished re-installing the theme and that worked. I got a newer version from the website, probably they might have fixed it.
Thank you again for the contribution everyone. Really appreciate it.

Get Top/Best Rated Product in Magento

I want to best rated product on a magento homepage. I have product reviewing module configured on my site.
i have tried following this http://www.odino.org/84/retrieve-top-rated-products-in-magento
but am unable to get it working.
My homepage is formed my calling one block from the cms home page {{block type="page/html" template="page/html/home.phtml"}}
and i have tried putting the php code in home.phtml
The link i have posted asks to create a helper, but i don't know how to go about that, so what i did was wrote a normal function within the page and called it.
Any help would be seriously appreciated :)
Thanks
Look at this module from Inchoo, explained with all the required changes you need to make with screenshots. Hopefully this will be helpful
http://inchoo.net/ecommerce/magento/bestseller-products-in-magento/

Change what appears when i click on a product

i need to know how i can change the behavour of the "click event" on magento when i click on a product. Like, instead of showing its details, do somethign else. Going to page x or alert soemting, i dont care, just need some starting help on that. :) in details, i need to get lightbox instead of the details page. but imn new to magento and dont know where to start.
thanks :)
It looks like you want to execute something on the existing page, as opposed to redirecting the page to some alternative location. To do that, just add some JS to the page that intercepts the click event and performs whatever action you want. You could put this into your own JS file and load it on the product list page like this (local.xml):
<catalog_product_list>
<reference name="head">
<action method="addJs"><script>path/to/your/script.js</script></action>
</reference>
</catalog_product_list>
Hope that helps!
Thanks,
Joe

Magento Problem

I am running a store on Magento. For some reason the "Recently Viewed", "Related Items" and "Featured Items" blocks have all disappeared from my site. They where definitely there yesterday so I'm not sure what's happened to them.
Featured Products is an extension I use and show on the home page using:
{{block type="featuredproducts/listing" template="inchoo/block_featured_products_main.phtml"}}
Does anyone have any idea what the problem could be?
Reindexing my products fixed this.
system > index management
Probably some Blocks that don't render. Check your /var/log/errors.log for clues (1) and remove the module if is giving you problems(2).
This one here is trying to load the Featuredproducts_Block_Listing class. Check if is there and if is not misspelled.
Have you added any custom module to magento related to products like feature products or products on sale, if yes then just make it false from XML file /app/etc/modules/module.xml
and then refresh or delete the cache and try again with front end.
If this will not work then just simply delete all cache, session and logs. and refreh the web page it will work.
Thanks
Magento Development

Resources