How to split (A/B) test Magento product pages - magento

I want to test different variations of product pages/layouts that I set up on Magento. It would be simple with a CMS page - but one cannot just create a new product. Customers should be able to buy exactly the same product, but enter on different pages.
NB: The google website optimizer thing (which I could never get working anyway) is apparantly dead now, replaced by content experiments via Google Analytics.

CMS pages are simple A/B whereas product pages are multivariate. That means you get something ridiculous like 32 recipes for a product if you go and setup different descriptions, titles, pictures and whatever else. It all works just fine in 1.7 but there is some effort needed to follow the screencasts, test and tinker.
If you want A/B for products consider setting up two stores/website views in the backend, e.g. 'store A' and 'store B'. Now edit the index.php and set the store code to 'A' for people with even IP addresses and 'B' for people with odd IP addresses:
$mageRunCode=(ip2long(1 & $_SERVER['REMOTE_ADDR']) ? 'A' : 'B')

Consider testing the layout change for only one product. The normal product page will be your control page (page "A")
If the price on the control page doesn't get updated frequently, simply create the challenger page (page B) as a static page somewhere on your server.
After you've done that setup the experiment in Analytics, add the experiment code to page A and you're done.

Related

Magento 2 URL Rewrites

I have recently moved my store over to Magento 2. The store is up and running and all is good. I've just noticed that for most products, Magento 2 has created 3 different URL's for the same product.
If for instance, the product is located in Category A > Sub Category B. The following URL's are created;
mystore.com/product.html,
mystore.com/categorya/product.html,
mystore.com/categorya/subcategoryb/product.html
I think this will end up being a problem for search engines, as its going to result in a fair bit of duplicate content.
Ideally I'd like to just keep the;
mystore.com/categorya/subcategoryb/product.html
url, how can I stop Magento from rewriting the other 2 urls, whilst making sure links still work from all pages.
It's worth mentioning, that if I visit the product from a home page link, it uses the mystore.com/product.html url. Whilst if I visit the product from the Category A page, it uses the mystore.com/categorya/product.html url. Similar if I click a link in the subcategory.
you can use default magento settings by stores->configuration -> Search Engine Optimization -> Use Categories Path for Product URLs -> 'yes'
If this can solve your problem

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.

Setup multiple Magento designs on single website

I'm setting up a Magento site and have some design requirements that we can't quite get right. What is the best way to setup for the website, store, store view and then the categories for the needs below?
Overview:
One domain name, one set of customers
3 similar product lines that appeal to different industries
Specific Requirements:
The home page should show static content about the company and featured products from all three main categories of products
Each main category of products should have a distinct visual design that carries through when looking at any of the products in those categories
It should be seamless for customers to move from one category of products to another and have the design change without having to choose a store from a dropdown etc.
Home Page: Design A, any and all products may show.
Category 1: Design 1, products only from cat 1 show
Category 2: Design 2, products only from cat 2 show
Category 3: Design 3, products only from cat 3 show
Every combination of websites and stores and store views that we have tried results in strange behavior like changing a store and getting "There was no Home CMS page configured or found." instead of seeing the unique design and category it should be showing. So far we can only get the designs to be different by making new CMS pages which doesn't seem practical.
This seems like something that Magento is made to do and I have to be missing something.
Thank you for any help.
-Shane
Your design needs imply work and considerations from multiple areas of configuration. I'll tackle them in turn. The tl;dr is that there may be more than one way to accomplish what you want, with the number of options at your disposal depending on your needs.
1) One domain name, one set of customers
Domain names (URLs) are configurable for all configuration scopes: Global (aka "Default"), Website, and Store (aka "Store View"). Ultimately, Magento configuration comes down to the most granular/specific scope, which is the store ("Store View") scope. If a configuration value is not specified at the store scope, its value is derived (inherited) from the website or global scope.
Customers are configured to "belong" to all websites or to an individual website (System > Configuration > Customer Configuration: Account Sharing Options). There is no out-of-box capability to restrict customers to a particular store.
2) 3 similar product lines that appeal to different industries
Depends on things discussed below.
1) The home page should show static content about the company and featured products from all three main categories of products
Assuming that you are using the standard configuration of having the Mage_Cms module serve up the home page (System > Web > Default Pages), that CMS page should be visible for all store views. CMS blocks and pages are restricted based on store. Now, later on in your post you mention that you see different behavior in the home page "instead of seeing the unique design and category it should be showing", which indicates that you would like to have different but analogous content for each store's home page. You can use one homepage to do this, but rather than specify content in the content area, you'll need to include your content by specifying a block in Layout XML Update - this block will load a particular category based on the store.
2) Each main category of products should have a distinct visual design that carries through when looking at any of the products in those categories
Establishing theme variants from global scope is possible at the website- and store-wide scopes. Theme variants can also be specified per CMS page, product, and category [each entity having a tab in its admin panel for effecting this change], with the latter having the option of "waterfalling" its custom theme settings to "child" categories and products. Which approach you take depends on your catalog hierarchy as well as the variations present in your themes.
It should be noted that if you need to present different category structure, or if you need to enable/disable products differently based on context, then you will be dealing with multiple websites. This is because category structure relies on root categories, and only websites are associated with root categories. As a reminder, "websites" in Magento have no implicit connection to distinct URLs, it's just an unfortunate naming convention for a scope level.
3) It should be seamless for customers to move from one category of products to another and have the design change without having to choose a store from a dropdown etc.
Based on this final stated requirement, and assuming that you are relying on Magento's native navigation, you are locked into one category structure, and will be using the approach of waterfalling category design, which you will set for each top-level main category under your single root using the "Custom Design" tab:
Another approach would be to create three distinct websites with distinct root categories and then build a menu by hand which links to each of the three stores, but I think this is less ideal based on your stated needs. You could also use one root category and then hide categories by website. Again, less likely that this will be appropriate for you.
Based on the information above you might end up clarifying or adding to your question. I'll update my answer in response if necessary.

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 custom browse catalogue workflow

I'm evaluating Magento for a particular client of mine. They want to enforce a particular workflow for browsing the catalogue. They're a travel company which puts together custom holiday packages and want to make sure users enter things like the number of adults / children before selecting accommodation (as number of people will affect available accommodation and pricing).
Note that accommodation is just an example, there are several other different components to a holiday package. And they've given me a 7 step (mostly) linear workflow they want users to follow before we get to anything which might resemble a checkout process (and even then their concept of "checkout" is quite different to Magento's).
I'm thinking of storing accommodation (and each of the other package components) in separate product categories. Then I can restrict what users can see as they browse the catalogue based on what they've already added to their shopping cart.
My research indicates that Magento doesn't really do this kind of thing out of the box. Am I mistaken? Are there add-ons which would support this kind of thing?
If I was to go down this road, would I be redesigning (or indeed, replacing) a large chunk of Magento's catalogue browsing functionality?
Well there are several approaches that you can take to implement something like this; but all require that you do custom development work.
You could define your packages as simple products with attributes for each of the specific package options and use that to filter each package from the others, now you would need to create a new module that adds a route on the frontend that is going to be your multistep form that will get all the information once you have all the information you can get a collection of all the products(packages) that match those attributes.
Now the deal there is if that price changes depending on the options selected if that's the case then you might need configurable products or something custom to change the price of each package.
It's really hard to say without real specifications of what your client needs, but if the question is if it's possible with Magento then the answer is yes it all depends on your level of skill :)
Kind Regards
So I ended up going with Magento as a product base and extending it using some custom code (been a while since I've developed in a LAMP environment!)
I created a static block which is used as the root of the workflow. There are 8 steps in the workflow which get listed in an ordered list. Each item has two custom Magento widgets next to it, which are a) a little tick image displayed when you've completed the workflow stage and b) a link which displays when you're up to that stage, clicking the link takes you to an appropriate catalog page (eg: choose accommodation, hire car, confirm shopping cart, etc).
I disabled the normal top catalog navigation to encourage users to keep within the workflow. That is, the mouse over to see more catalog detail of the "holiday planner" is disabled (although you can just navigate to the correct urls if you know them, or are smart enough to use the SEO link at the bottom of the page!).
Everything in your holiday is added as cart products (which has the positive side effect of Magento will remember your holiday if you get part way through it).
There is a big state machine in a helper class to determine what stage of the workflow you're up to. This checks your cart to see if products with particular sku's or from a particular attribute set are added.
I also overrode many URLs and redirects (eg: after you add a product) to send the user back to the root holiday planner page. This added to the workflow as almost every action you did or product you add bounces you back to that workflow page (which always tells you what the next step is).

Resources