Redirect Magento user to different store view checkout / product page based on product attribute - magento

Is there a way to force a switch to a different store view in Magento when a user clicks on checkout or the product page?
To clarify the issue, let's presume we have 2 different store views in Magento:
One main store view (View A) that all users go to upon arriving to the store. This view displays products that are set to appear in all store views in the system
One customized store view (View B) that has some specific branding and some other specific settings related to checkout, payment gateways etc.
When the user is browsing products in View A and clicks on either the checkout link or the product page link, we want to redirect them to View B and let them proceed with the checkout in that View.
Is this possible to accomplish in a relatively easy manner, and how?
Thanks.

In Magento each store is assigned an interface. An interface can have multiple themes in it. This is what I understand by what you call a View. Your templates can refer to theme1/css or theme2/css to give you different looking View A and View B.
To create a different looking checkout page you will have to code app/design/frontend/myinterface/default/template/checkout/onepage.phtml or whatever to use the appropriate theme1/css or theme2/css to change its look.
If however you are using different interfaces then they can only be assigned to different stores. This would be a multi-store setup. In which case you can change the Checkout button in View A (Store A) to link to View B (Store B). You will also have to write some code to allow automatic population of information for the order from Store A to be passed to Store B.

Add a new store config which will store the base url of the product listing store.
We want the user to land on the checkout site home page, that will be the main page and you can override:
/Catalog/Model/Product/Url.php
getProductUrl and getUrl functions
where you would simply string replace the returned parent::getUrl's base url value with the base value in your new config.
Therefore what will happen is when the user clicks on catalog navigation they will be taken to the other store. Finally when they again click back on checkout or any other link that will bring them back to the checkout store.

Related

Magento 2 - Transfer cart items from API to web store

I am creating a complex shopping configurator app that allows a user to customize and visualize a product which consists of multiple store items. Once they confirm their purchase, I iterate and add all of the selected products to a guest cart using the .../rest/V1/guest-carts API endpoint.
I would now like to forward the user to the store checkout to continue the purchasing process from the web store, e.g. https://store.url/checkout/cart. Of course, that basket needs to be populated with the items that were added via the API. I've looked through the documentation but not been able to find
anything relevant but I wonder if I can pass over the store_id or the quote_id and the relevant products be inserted accordingly?
Not sure if this is still relevant for you but, I was also working on a similar problem and came across this plugin for Magento 2. Basically what this plugin does is use a customer's token and a quote_id and creates a temporary session on the Magento2 Store and then redirect the user to the checkout page. This was a starting point for me, as I had to customize this plugin further to suit my requirements.
Hope this helps.

Magento 1 CE - How to create a diferent category for each Multistore

Thank you for reading..
I have created a multistore site based on 4 diferents subdomains domain1.site.com domain2.site.com and so on, everything works, i have diferent logo and design for each site, but i need to enable and disable categories already created for each site, is this possible?, i dont mean root category, i need to show a category for one site, and other category for other site, is this possible via admin panel or at least via code?
I have tried to create root category and disable category by category for each store view.
Yes. Its possible but quite complicated. let me explain you how you reach that.
You need to create one custom category attribute and just set the value in which you want to display that category.
In category page (coding side) you just need to check this attribute value and write your condition according to that.
Create a new Root category into magento admin
Admin >> Catalog >> Manage Categories
Now Go to Manage Store in
Admin >> System >> Manage Stores
Click on your new Store for which you need to set different category.

Magento Hooks - Will Magento allow me to do this?

I'm going to be starting a E-Commerce project and the client is interested in using Magento. In this project, when a customer adds something to the cart, I'll need to pull them out of the flow, where they'll proceed through a custom wizard-esque area.
They basically design a document using a drag and drop interface. After they finish, that document will be saved as a PDF, and I want them redirected to checkout
So my questions are
Does Magento have hooks available for after an item is added to the
cart ?
If I pull them away to this other section of the site (Wizard
portion), changes they make will potentially add costs to
their cart. Would I still have access to products, prices, and the
cart so that I can continue to modify their cart until they return
to checkout ?
Magento users Event-Observer pattern, where you can hook into virtually any action which is performed and execute your custom code,
Refer to below links,
http://inchoo.net/category/ecommerce/magento/events-observers/
https://gist.github.com/peterjaap/6973324
http://huztechbuzz.wordpress.com/2014/04/26/complete-list-of-all-events-in-magento/
http://www.nicksays.co.uk/magento-events-cheat-sheet-1-7/
So you have to figure out which event you can use and plugin your custom code.
As long as i remember all the cart info ( products/prices ) is stored in the $_SESSION. So you can get all the information from there you need, modify it via your so-called wizzard and udpate the session information after that!
Cheers! :)

How to link a specific store view in Magento from outside the store?

I have Magento set up in a multi-language store so that every language has its own store view. I have an HTML landing page where users choose the language they want, and I want to link each store view from the landing page.
I need to create a URL for each specific view so that it can be accessed from the landing page (like my_magento_installation.com/spanish, etc.), outside of the Magento installation. That means that I can't use any core code to get the store view.
I noticed that this URL format:
http://www.my_magento_installation.com/?___store=view_name
...is shown in the URL bar after selecting a specific store view from the default dropdown in Magento. However, if I set up a link with this format from outside the Magento installation, it just redirects to the base URL (www.my_magento_installation.com)
Thanks in advance,
Pau
Pul Vila,here the soap list using soap client of magento list ,for referece here http://www.magentocommerce.com/api/soap/miscellaneous/store.list.html
after using htaccess write url of landing page...https://stackoverflow.com/questions/21433203/donot-want-show-magento-home-using-htaccess-file

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.

Resources