How in magento add manufacturer in the URL of the product? - magento

How can I change magento so that:
{site}/category-name/sub-category/product-name
becomes
{site}/category-name/sub-category/manufacturer/product-name
Where is the standard Magento manufacturer attribute?
Thanks :)

You would need to overwrite the system's url rewrites to do that. You could either extend the class that creates the product rewrites in the first place (it probably happens somewhere in the product controller in the admin site) or create an event observer which updates the rewrites after the product is saved.

You will need to create any necessary attributes for manufacturer, etc, in the admin panel if you want to use them, but that won't really solve this problem. I understand what you're looking to do, but messing with the parsing of product URLs doesn't seem like a great idea (you're likely to run into problems). You could probably change the product url in the database (usually saved as 'some-product-name.html') to something along the lines of 'manufacturer-name/some-product-name.html'. I don't see any immediate reason why that wouldn't work, though allowing the customer to change that themselves may not be trivial.
Hope that helps!
Thanks,
Joe

It is a workaround, but you could create a manufacturer subcategory and place the products in there?
So:
root -> subcategory -> manufacturer-subcategory -> product
?
Because as per Joseph's answer, I think what you're attempting to do would be a little messy.

Related

Magento price showing twice

I installed a new template on my Magento store and when I got to a product page it shows the price twice? Most of my products are a "simple" Product and I have one "Configuarable" product
Any ideas how I can get rid of one of the prices?
Here is Simple product:
Here is configurable product: (with an option selected)
Any ideas?
I'm running latest 1.9.3.7 and can't find a fix anywhere
You need to check your
app/design/frontend/default/your _theme/temlate/product/view.phtml
1st: inspect find the class or id
2nd: then remove wrong price code
before doing this take a backup of your file
I don't think anyone can help you here unless it's a popular theme people would know. The problem is not in Magento, it's in the theme files. You will need to find the theme file and check the php logic to truly know what is happening there. Best case, contact the theme developer if you purchased it or switch to a new theme.
To find the theme file responsible for printing the price, you can enable template hints. This will show the hints to you and all the customers, so be diligent about doing this live. Secondly, you will need to take a look at the block which encompasses the pricing. When you find the template name, just go to the .phtml file and see what's going on there with the price output.
Edit app/design/frontend/default/your_theme/template/catalog/product/view.phtml
Look for price divs and comment one.

Landing pages defined by attribute for Magento

i'm looking for solution how to have a landing page with products which are filter by some attribute (ie. Brand = Addidas). I was checking advanced search but it doesnt provide layered navigation, which is requested by client.
What I found is the free module http://fishpig.co.uk/attribute-splash-pages.html. It seems to be working, but for each combination of attribute X attribute value I need to configure something in database. It's not useful if you need to maintain thousands of combinations.
My another idea is to review catalog/layer model to remove filtering by category but it probably destroy something :)
Have you any idea or direction where would I go?
Thanks, Jaro.
have a look at http://yoast.com/landing-pages-module-magento/
i've used both and find fishpigs much better for manual creation of optimised pages, but for blasting out auto landing pages yoast is ideal.

what type of products should be used to achieve the below mentioned functionality in magento?

I want to implement the functionality in magento, the link of this is below :
http://ledflashingwatch.com/clocker-watch-illuminati-series/
when you click on strips, it changes strips image but when click on dial, it changes separately. And also add to cart will differentiate the product on these two values.
Can anyone advise me on how to proceed towards approaching this idea. And which type of products to use for this.
You can ask me questions if it's still not clear to you. And do tell me if it is not possible.
This feature is not available in Magento out of the box.
There are several possible approaches, but the user interface component will have to be custom built by you.
If you want the selected products to appear separately in the cart (like in the example you linked) choose simple products.
You could also use a grouped product with a custom interface.
If you want them to be added to the cart as a single product, but internally they are separate, use a configurable product. This is the option I personally would prefer.
You could also use a bundled product - It all depends what exactly you need.
I suggest first getting a good idea of the differences between the product types. Then study how they are reflected in the quote as quote items, i.e. visibility, parent and child items etc.
Once you know that, the implementation will be rather straight forward.
Build the UI. Build the request parameters for the add to cart call. Done.

Opencart, remove category string from the canonical URL of a product

In Magento there's a tick box - if you want or not to have the category in the product's link.
In Opencart there's no such think. What there is in Opencart - is a file which manages the SEO interpretation of links.
If you'll add "/" in front of the link within that file (the professionals who worked with it know about it) that will make the link absolute instead of relative and the product will appear at the beginning of the web site root.
My concern is that at some point this will break and I'm looking for a solution which can be applied on a commercial platform 20k+ products where failing can bring real damage.
The files I was talking about are these:
1.4.x: /catalog/model/tool/seo_url.php
1.5.x: /catalog/controller/common/seo_url.php
The change I already know you need to do is:
$url .= '/' . $query->row['keyword'];
replace with:
$url = '/' . $query->row['keyword'];
It breaks things such as breadcrumbs, again - my concern is that I don't know what other things it breaks therefore I'm looking for another solution.
SEO is mandatory, any SEO advice / plugin applied on Opencart will be more than welcomed. I'm constantly researching the market for related software, I'm willing to change the CMS (which will involve investing hours of development) if I can get better solutions.
Currently I'm dealing with Magento which is NOT flexible, each change drives us crezy - we're looking for something nu that buggy and difficult to work on.
What version of OpenCart are you working with? The latest?
The standard MVC structure of OpenCart combined with native PHP coding makes it a tremendously flexible CMS solution.. (I actually use the core for numerous types of sites).
OpenCart currently depends on the two files you mentioned combined with the SEO table in the database to handle rewrites.
It does not really 'break' the breadcrumbs. Breadcrums are more a history/navigation aid. With SEO urls if you enter a specific product URL you are navigating immediatly navigating to a specific item. So in the heirarchy it would only be one level below the home page..
e.g. yoursite.com/seoproduct
'home' -> 'seo product'
If you use the navigation heirarchy it still renders correctly (without the mod you mentioned)
'home' -> 'category -> 'sub-category' -> 'seo product'
That said, in theory it is easy to acomplish whatever you want with SEO urls. A simple modification to the two files is enough.
In practice, it just depends on how you want to handle them...
How are you going to handle specifying the SEO url for the product? Based on product name? Product model? Or are you going to use the native SEO field in the product info?
If it is the latter, the cart will automatically handle the rewrite. Unfortunately, letting the cart handle it natively also carries the greatest risk of links breaking over time as changes are made.
If it is one of the former options, you will need to make some modifications to how the SEO rewrite is handled.
Once you determine how you are going to be handling the rewrite you can put it in action...
The easiest modification would be to use the native SEO but then add in a redundant search fallback. If no results are found on the in the common/seo controller, have it search for results. If one is found display the product - if more than one is found display the results..
On the other hand, you could completly modify both files and go with a custom SEO handling. (again using a search to find the product)...
I have done it both ways... The first tends to have a bit better performance as it does database/text search only if the direct query returns no results...
There is a canonical tag in the head (at least in version 1.5.0) and in my testing this stayed the same regardless of whether or not the page was access through http://example.com/category1/product-123 or http://example.com/product-123.
<link href="http://example.com/product-123" rel="canonical" />
I would recommend looking at How can I create custom SEO-friendly URLs in OpenCart? for your other pages (information, cart, checkout, etc).
I've took the decision to:
Not set a string on the SEO field of each category
This will not add the category name before the product
This means that instead of /category/product I'll have /product
As CarpeNoctumDC said, I could change the PHP files so that the category could've been removed automatically but the disadvantages I can see are:
You need to update the core PHP files on each update
Can't certify of there are places where that turns against you, since it's not part of the theme but it's part of the core of opencart
The good news is that there's no need for the brand / manufacturer string before the product name (as many of us probably need) because we can use the manufacturer feature for that.
In this way the category / subcategory can be non relevant SEO text (which in my case is), the product link is legitimately set by opencart to /{link} which is totally SEO friendly and if I need a representation of the link with the manufacturer I only have to set a SEO link to the manufacturer itself. This will generate /{manufacturer}/{link_of_the_product} which on top it has within the header a canonical link pointing towards /{link_of_the_product} - in this way Google will not be disappointed.
As this very moment I'm doing the exports / imports form the old Magento 1.6 which turned to be a pain to the opencart customized as mentioned above.
We've passed Google Panda - there's no bad history on the domain, no duplicate content so far (~10k products) - we'll see how things turn after this major update.
If Google doesn't agrees with this config, I will post warnings on this topic.
Bogdan

Magento admin section

Hai
In my magneto project, admin side invoices, I want to display the product name, sku and
manufactures, is it possible???
I know that when clicking View Link I can show, but I want to show the details in the table in the invoices page
Probably the best place to start is:
/app/design/adminhtml/default/default/tempalte/sales/order/invoice/view/
Everything within the /app/design/adminhtml/ is where you'll want to go to edit any available templates for the backend.
Remember that Magento is full of magic methods. So, often times if you want to output a particular attribute, simply call something like: echo $_item->getManufacturer();
Hope that helps.

Resources