Magento programmatically created attributes showing up in backend but not frontend - magento

I have a script that bulk creates attributes and sets in Magento. The attributes and their sets look fine, and the settings are correct. When these attributes are created, I use AMartinez's customimpertexport script to bulk import products. These products do have the attributes correctly filled in.
If I look at a product in the back-end, they are there, with the correct values. When I take a look at the front-end however, the values are not displayed. Also, the layered navigation does not work (probably because of forementioned bug).
This makes me think there is something going wrong with linking attributes to products.
Since I'm pretty new at Magento, I don't know very much of it yet, so any explanations on how or why would be apreciated.

Check out your attributes' settings. "Use In Layered Navigation" and "Used in Product Listing" options should be enabled.
Also you should use default Magento import/export functionality. Just keep in mind that the script has a really strange and sillent way to handle exceptions in code formating and missing fields, only hard exceptions like missing SKU fields are displayed.
Here is a tutorial fromt he magento knowledge base
http://www.magentocommerce.com/knowledge-base/entry/tutorial-using-magentos-import-export-profiles

Also, you should check of the attribute is visible on the frontend.

Related

How do I get Magento 2 data to use in the template?

I am starting in the Magento development world, and I'm creating a new theme.
On my theme, I have a block which displays business contact info, but I don't know how to get the data from the store.
I have to make a custom menu as well, but stop in the same problem: getting category data from the store.
I also wanted to know if there is any place where you can find more references on this data return issue, such as what available methods and classes are available, for example.
Where do you want to display the custom data ? In a product page or your custom module's separate page ?
If you want to use custom block in sidebar you can follow steps given here
https://aureatelabs.com/magento-2/how-to-add-a-static-block-in-a-sidebar-column-magento-2/.
Here are some ref you can use:
https://itectec.com/magento/magento-magento-2-get-custom-module-data-in-theme-phtml/
https://code.vky.co.in/display-custom-module-collection-data-frontend-magento-2/

Managing contents in multilingual stores in Magento

This might be a basic question, I'm still relatively new to Magento. I have 2 store views in a magento project. 1 for English (default) and 1 for Japanese. While working with both store views, I noticed how if for example I switch to the Japanese store view, if I redirected to a different page or content on the store, the language goes back to English. How do I prevent the website from going back to the default language every time I change categories/catalogs?
That is all about Magento Admin setting. While creating Content Pages/Categories/products, there is a option that ask to choose Store View.
You can add content for Cateogries/Product/CMS Pages for each locale. If it is done then you'll be able to see your site content on the basis of current locale. Hence you need to go through Magento Admin first.
Hope it will work for you. Please let me know if any issue.
Managing contents in multilingual stores in Magento is easy.
Edit/Create Product/Category/Page/Static blocks according to need storeview and put content according to languages in that.
Now access pages by store code, if we are using that.
In some case we don't find the heading names according to languages so just enable inline translater from admin and do translation specific to store/website.
To run Magento store using urls we have both options index.php modifiction and using .htaccess using website and store codes.
On running Magento multisite , multistore. We generally face the common urls for media, js and other resources we should use symlink to increase SEO ranking and score.
Please feel free to contact.
Install your language package.
Create products, categories, pages, and static blocks on the basis of your selected language.
Sometimes translation does not work for few words. In those cases, Inline translation from admin will help you.
Managing content according to store view is very easy.
follow up below steps for managing content according to Store view.
Edit your product or category or your page and static block etc.
after that you can see store select left side in product and category and on page you can see feild below url in static block also. select your store view.
whater ever you want to change or edit please do according to you.
After that save it will apear only on your selected store.
Note: if you not edit any fild by store then it will show default store contents.

Magento - configurable products not showing up when searching

When I search for a configurable product (by name, name fragment or SKU) the search does not return any configurable products. I can search for simple products.
The configurable products;
Are in stock
Are set to "catalogue / search" visibility
Are visible in the categories and are purchasable
This is a multi-store setup and this issue only affects one store, so I'm assuming it's a configuration issue, but I can't find any setting that might stop configurable products being returned in a search.
I'm open to suggestions on this one, I'm pretty sure I've overlooked something silly - I just can't work out what!
Realize this is an old post, but for others: When working with configurable products you have to make sure that all simple products related to that configurable product are activated for the web site (this is different from "enabled" - see image). Even if one of the simple products for a configurable product is not enabled for the web site it will be sold on, the configurable product will not appear.
I tracked the issue down to a third-party search module. If you're having the same issue, disable any third-party modules that replace the standard Magento search function. If the problem still exists, see the other answers here for some good advice. If the issue resolves, you may need to contact the module publisher.

Can Magento be used as a CMS to build a product catalog(not a store currently but maybe in the future)

I have to build a website for a mobile store. They want to list their products but don't want to start selling yet. I have done a lot of website with Joomla and Virtuemart.
This time I want to use Magento as they use Lightspeed a POS that offers integration with Magento community edition.
My question is can I simply use Magento as a CMS to only display products and a few static pages like about us etc. I went through stackoverflow and found that some members have recommended some good blog integrations for magento so that part is solved(Thanks :-) ).
I know I can use wordpress as a blog with magento.
I rephrase....Can I use it to simply display products!
If Yes then please let me know if I am doing it for the right reason.
the reason are:
Adding products and product information becomes very easy in a
shopping cart(But in a CMS like Joomla each page has to be literally "designed" or I will have to use CCK editor. It still
becomes difficult for the client to update products IMO)
It comes with built in plugins to show related/featured products
etc. with a click on a button or options in the backend while client
simply puts the appropriate tags(With a CMS have to use a plugin or
module in Joomla that has to be set to show in the particular pages)
Automatic display of images etc is easier in Magento in comparison
to a CMS like Joomla where I will have to use a plugin or a gallery
that is set to show inside an article
The buy/add to cart button can easily be disabled and a "more info"
button can be added that will send an email to the client. They get
the exact product code the customer is asking for(Doing that in
Joomla would require a lot of extra stuff like adding codes or use
an advanced contact form with a tag to be entered for each page)
Last but not the least when client is ready to go online it can
easily be converted
Does Magento have two display? One is simply a catalog and the other a store. I have seen that in some stores online(not necessarily using magento) I am assuming either they created a website with the products pages first and then added a store later.
But in many cases it looks like a part of the Shopping application.(i just can't seem to remember which one they were using now).
If Magento allows that then I think my problem is solved. I simply use the "catalog option" and when the client is ready for the store I simply pull the products using a extension from their POS software.
Thank you for taking the time to read/answer.
Using Magento as a catalog only without selling the items is pretty straightforward. The easiest thing to do is just to use the catalog category lists to list the products and just make sure the "order" button is not visible.
You can do this simply by removing it from the product detail template (and the list/grid template in case they have it).
Or you could (I think) set all products to 'out of stock' this will automatically remove the 'order' button.
If you want to be thorough you should edit the cartControllers's addAction to disable adding products to the cart.
If you are going to combine Magento with Wordpress, Fishpig has developed a plugin with which you can use shortcode within Wordpress blogposts or/and pages to display products.
More info about that can be found here: http://fishpig.co.uk/wordpress-integration/docs/shortcodes.html
System > Configuration > Advanced > Advanced
Disable the modules you don't want to use.
For example, if you wanted to use Magento as catalog only then disable sales module.
Hope this works for you!

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