Extension that display articles/module based on visitors category choice - joomla

Does anyone knows an extensions that will display Joomla! articles, like a category blog layout, based on first interaction visitors choice?
I don't want to stress the visitors and to make them create a user and then select the category of interest unless it's a must do.
I want to make them choose some category of interests (News, Fashion, etc.), set a cookie with those values in their browser and then display the latest articles from those categories and remember for, let's say 30 days, the choice for further visits.
Thanks in advance!

I don't know of any extension to do this, but you could do it yourself easily enough. You could have a page to first check the cookie. If set, then you redirect to the category blog. If not, then this page has a form which collects the info and sets the cookie, and then redirects to the category blog. You could use Breezingforms for this, as it allows you to add post forms actions, so you can set your cookie.
Your category blog would have to be a custom component (I don't think you would get away with a template override of com_content here). You could copy com_content to create a new extension and then you would only need to read the cookie and adjust the categories displayed (instead of the component getting this info from the database). Everything else would be the same (if you have existing template overrides for com_content remember to copy them over).

Related

Joomla category list issue

This is difficult to explain but I'll do my best.
I have a site with a number of articles grouped into different menus, which allows me to present relevant content to the visitor depending on what they are interested in. Each article may be in a number of menus.
I have also categorised each article based on the menu that it is most relevant to. I have done this in order to create a landing page using the category list component.
The issue I have is that the urls in the category list output do not relate to the active menu, when the article is in a number of menus. When you click on the article it takes you to the different menu. This issue is fixed if I unpublish the article from all other menus. I understand this is because Single article menu id takes precedence over category menu id's.
I need a fix that selects the active menu id rather than the default.
Any help appreciated.
Joomla cannot do what you want to do by default. In short, you have multiple URLs for each article and you want Joomla to automatically know which context that article is displayed in in order to display the right URL. Joomla can't do this.
What you need to do is that you want to override the layout module for that category and create a code that will get the right URL based on the context you are in. Not a very easy thing to do but this is how it should be done.
Note that there are some extensions, such as flexicontent, that allow articles to be listed in multiple categories, and that will handle such URLs correctly depending on the context.

Confused between Joomla Alternative Layout and Templating with K2

I am really confused about these 2 concepts. I am basically wanting to change the appearance of the Joomla category page that lists the sub-categories in it. I dont like the default "Alternative Layout" options of Blog and List type. I want to show the sub-categories with an image + sub-category title style similar to some Portfolio layouts I've seen. So I started googling and reading a few docs on how to do this. During this time, I came across the Layout Overrides in Joomla which says that we can create alternative Joomla Layouts to display Modules, components, Category and Menu Items.
Q1) So does this mean that I can create a new layout (for portfolio category as an example) and if I place them inside "templates/myTemplate/html/com_contact/category" folder this layout option will be listed under Alternative Layout drop-down list in admin panel?
While I was reading some more, I then came across the K2 method where it says that K2 allows creating sub-templates to have different styles for each categories. I havent decided if I am going to use K2 or the core Joomla articles. But my main concern is to style some category pages differently to the default blog or list options. When I read the above article, I thought this can be done in Joomla core itself. But when I read the K2 article on Templating with K2 (and the concepts of sub-templates), it said that the core Joomla doesnt allow sub-templating and K2 can do that.
Q2) What is the difference between creating sub-templates for K2 categories and creating custom template layouts for Joomla categories?
I am totally confused here. If Joomla allows to create different layouts for categories which can then be chosen from the admin panel on what layout to use for that category, what is so special about K2's sub-templating which claims that only K2 allows the flexibility of choosing a different layout for different categories?
Can someone help me understand this please? I have been searching to understand the difference for several hours and I am still stuck on this...
I am new to Joomla and I am using the Joomla version 3.3.
There is a big difference in Joomla core Alternative-Layouts and K2's approach. Hard to explain in theory...
Joomla:
The core feature offers two choices: Either create Alt-Layouts and assign them to each Category and (each!) Article in Backend. Or with a new, alternative MenuItem. The latter is achieved through an additional XML file with same name and location. As long as you work with Categories and Listings, the result is quite similar. But it is different when it comes to the Article Fullview: You won't get an alternative layout for full view automatically! You have to assign the layout in backend or use 1 global setting from the article options. The latter will only apply to articles that have no respective Alt-MenuItem. This can result in a "chicken-egg-situation". AFAIK, frontend submission requires an alternative MenuItem for each edit-form. You can't get an alternative full-view layout when you click on a blog/list item "easily". The links from your category items still lead to the "default" without extra work. In my experience, full-view layouts are displayed in the following setups only:
Alt.MenuItem (XML) for Category and Article. A MenuItem for each article has to exist, to automatically pickup your alt.Layout.
Alt.Layout assigned to each Article. (manual work)
Alt.Layout set for Category (no XML). Only 1 global setting in Article's manager options.
K2:
The layout folder structure is simpler. All layout files live in the same folder, you just rename that container folder. e.g. products. The inner files keep their default names. This results in an easier and automated "workflow". A layout is assigned to a category and/or its sub-categories. Article full-views pick up their layout automatically, due to the file/folder structure. There is no difference between frontend/backend. No manual assignment on article edit is needed. Nor single K2 items in the menu. (not to mention, that you get extra fields per category)
Hope this helps.

show articles only in featured page

http://example.com/products/2-uncategorised/
http://example.com/products/2-uncategorised/2-aaa-bb-ccccc
I have this structure, where products is a featured page with articles. What I want is just block the access to the category and related articles.
So, http://example.com/products/2-uncategorised/ or http://example.com/products/2-uncategorised/2-aaa-bb-ccccc should redirect to http://example.com/products.
The only way that i know is:
#RedirectMatch 301 ^/products/.*$ http://www.example.com/products
Note: If I change the permissions of the article, available only to Registered users then the article is removed from the featured page if the user is not registered (wrong, this page should be public).
I need to preserve all articles in featured page and block the access of the individual article and the category that it belongs.
The question: There is another way without .htaccess ?
What is the problem with having multiple paths to the same article?
Are you worried about the user experience or the effect on your SEO?
If it's the later then you have some control over this.
Using "canonical" tags, you can stipulate which is the master URL for Google et al to index.
You can also manipulate the robots setting for each category or menu item.
If it's the former, I certainly wouldn't recommend redirects in htaccess. If you absolutely must redirect, use the redirect component that comes with Joomla. Still not recommended for this.
Why don't you do away with the featured page and just use articles with their own hidden menu items. This will give a direct access, no category view. If you want to add other articles to the bottom in a blog like style, you could add articles to modules and get a similar effect?

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.

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