Magento - Print category attribute on category page? - magento

I followed the below tutorial to add a custom attribute to my Magento categories:
http://www.atwix.com/magento/add-category-attribute/
It seems to have worked as the text field shows in the backend and I can see the attribute in the database (eav_attribute).
The problem is I can't get the attribute to display in the frontend. I have added the code suggested in the tutorial to view.phtml but it didn't work.
I have also tried
if($_category->getCustomAttribute()) {
echo $_category->getCustomAttribute();
}
Any ideas for getting this to display in Magento 1.7?

Try doing a reindex in admin
In Admin -> System -> Index Management

Related

Magento 2.3.4 product shows a blank page after migration process

After migrating from Magento 1.9.3 to Magento 2.3.4 I can see a blank product page.
For the solution, after checking that when product is saved from admin side I am then able to see product page and visible.
Another one I can see that ,
1 exception(s):
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'reference': This element is not expected.
Is this any layout issue occurs this problem or image issue is making this error.
I think you will have used the Custom Layout Update field in Magento 1.9.
If you search in your database table 'catalog_product_entity_text' in the field 'value' for reference it should return the problem products.
See here for the new way to use product page custom layout updates:
https://inchoo.net/magento-2/override-magento-2-layout-product-page-example/

urls giving 404 in joomshopping joomla

I am trying to use joomshopping extension for Joomla to list products.
I added products on home page.
But clicking on an individual product(or Buy or Detail) leads to a 404 page
e.g. Buy has a linkhttp://dev-joomla.mytest.com/cart/add?category_id=1&product_id=2
and
Detail has linkhttp://dev-joomla.mytest.com/product/view/1/2
In the backend it's like this
What could be the issue ?
Following solved the issue
In System -> Global Configuration , set the following options to No

get related products on product category page Magento

I am working on a magento project, in which I need to show a
related products of a each product on product category page along
with a main product.
Can you please suggest how can I do this and get related products on list page. I have follow this link, but cant get it to work.
Hello i think you will create custom template file & call into list page
like catalog/product/list/related.phtml

How to create custom customer field in Magento login page?

I was searching for the latest method to add custom fields on Magento 1.6 login page. All the articles that I found was for earlier versions on Magento and It's not working.
Edit customer/form/login.phtml template
Edit loginPostAction from Mage_Customer_AccountController (see How can I override a Magento controller?)

Magento - Configurable products not visible until manually saved in admin panel

I have a script that is creating a lot of configurable products and their associated simple products.
Everything goes ok and when inspecting the products in the admin section, everything is linked up and looks great.
The problem is that the products are not visible until I manually go to the admin section and save the configurable product - without changing any options - and then each simple product that is associated with it. After each simple product is saved, its option becomes available on the from end for the configurable product.
Does anyone have any ideas on this?
Solved this by going through the saveAction in the Mage_Adminhtml_Catalog_ProductController.
I wasn't setting the websiteIds correctly so the new products were never getting added to the site correctly.
Magento uses this piece of code to get the correct website:
$product->setWebsiteIds(array(Mage::app()->getStore(true)->getWebsite()->getId()));
Drew's answer above worked for me. For those using the REST API, this option is under extension_attributes like so:
"extension_attributes": {
"website_ids": [1]
}
Where 1 (for me) was the id of the website where I wanted the product to appear.

Resources