Redirect a product to other website - magento

I am looking for a way to have a product on my magento store, make it visible but not purchaseable and redirect users accessing it to another page/external url.
Basically i have 6 products and would like to redirect all users who go to one of those products to another domain / external url. The product should be displayed but not be purchaseable - rather instead of add to cart link to an external url - or if possible even redirect the whole product detail page to another url...
What’d be the best way to do that?
i am trying for two days already but haven’t found the best solution yet… my programming skills aren't the best yet...
thanks!

i think what you should do is to add one new attribute for redirect url , for your six products you can specify the redirect url in that attribute , and in the list.phtml you can place a condition that if a product has value in that attribute , you can use that value in anchor tag and in else case you cam use the regular product links for other products .

i mean you can add a new attribute for a products in admin like there is other attributes eg. name, description , and in file you can fetch your new attribute like other attributes , just replace the attribute code with your and take that in condition that it will work work only if the product has the value for your new attribute
for fetching attribute in your file you can use <?php echo $_product->getAttributeName() ?>

Related

Create magento product that links to an external website

I want to add a product that is not held on my magento website. It must only show on my website. But when a customer clicks on a product it directly goes to the website that holds the product.
I want to give the URL to the product on the site. I am not sure how to do this. Please help me. Thanks.
Here are some screen shots that show what I actually want to do:
product show on my website
Customer goes to other website
The way i would suggest you is to create an attribute called external_url, a textinput field. Assign it to required attribute sets then, while adding product if that particular product will be linked to external; input that field with external url.
And while populating product in listings, check if that external_url attribute value exists or not. (for eg on template/catalog/product/list.phtml check for this value $_product->getData('external_url'))
If the value exists then, change the product link(on product list.phtml change $_product->getProductUrl() with our $_product->getData('external_url'))

Use Categories in Product URLs for ALL Urls - Magento

Systeam creates two URLs for one product:
http://www.website.com/shirt/white-collar-shirt
http://www.website.com/white-collar-shirt
I want only one URL with category in it....
In our store we not have many products - 30 or so. Is good idea to redirect with .htaccess ?
Redirect 301 "/white-collar-shirt" website.co.uk//shirts/white-collar-shirt
How do I achieve that?
It's bad idea to use .htaccess, because you'll have to make changes to it every time you change url key of product or add new one.
It's not a simple task, one of way to achieve it, is to create custom extension which will create url rewrites for products to url with category.
Another way if it's suitable for you is just set in configuration "Catalog > Search Engine Optimizations > Use Canonical Link Meta Tag For Products" and search engines will store url for that product as one for both url, but it will be url without category. It's easier to develop.

Magento - Show products from a category on homepage without using CMS

I am trying to render the products from a certain category (homepage products) which has the category ID 123 on my homepage.phtml template.
I also want to use a new list template I have created which is located at /app/design/frontend/default/mytemplate/catalog/product/homeproducts.phtml . Its basically a copy of list.phtml but with the toolbar and add to cart buttons removed.
What would I need to add to the phtml file to call the category (123) using the template homeproducts.phtml
Configuring a Magento Category to be a Homepage
TL;DR: Do it in the Admin at System > Configuration > Web > Default Pages
Magento uses the URL string to route (dispatch & match) requests to a given action controller class. However, when the URL is
http://site.com/
There is no information for routing - there are no strings to match. In this case, when the Front Controller dispatches, the request matches the Standard (frontend) router because of its _getDefaultPath() method. This effectively uses a value from the configuration (web/default/front) to match, allowing for a GUI-administered value for your homepage.
By default this value is "cms", aka "cms/index/index", which by default is the CMS page identified by "home".
You can change this string to whatever you like. Setting this value to "catalog/category/view/id/10" for the sample data would make your homepage by the "Furniture" category.
SEO NB: You will need to handle duplicate content issues. Enabling canonical URLs for categories may help.

Magento translate tags

i have a magento installation wich works pretty well.
So far so good, i've set up different Store Views to manage the store in different languages.
Now, i have the following problem:
I've set up tags from the administration and assigned them to the different products in the different store views (let's say i assign the tag "Buch" to a Product in the german store view, i assign the tag "Book" to the same product in the english store view.
If then a user clicks on one of the tag-names it shows the list of products with the same tag.
But if he changes store-view then, magento keeps the same tag and says that there are no products with that tag.
This seems quite logically, because tags (as far as i understood) are not translatable.
What i want magento to do, is that if a user changes store-view in the list with the products, use a translation of the tag (lets say, a user sees all the products with the tag "buch" and changes the view to english, he sees all the products with the tag "book", or, if that is not possible, when changing store-view, that he always goes to the store homepage.
Thanks 100000 times in advance =)
The only solution I see is to translate tags manually. To do this you have to modify all occurrences of your tags in your templates. For example in template/tag/cloud.phtml replace
<?php echo $this->htmlEscape($_tag->getName()) ?>
with
<?php echo $this->htmlEscape($this->__($_tag->getName())) ?>
And then add the translation for each tag into app/design/frontend/[your-interface]/[your-theme]/locale/de_DE or any other language.
As an alternative solution you can create a custom module which will override $_tag->getName() function and add $this->__() in there.

Filter one specific attribute values from products in magento

I'm new in magento, I'm working on http://www.theartworkgallery24.com/stage/ website. Please check beneath flash banner, there are 4 big images that are links to attributes value from which user can directly go to a product.
I need a page that display on one specific attribute values like in case of artist, it should be Gustav Klimt, Leonardo Da Vinci etc. These should be links to actual product related to the attribute values.
Please tell me how to make your own PHTML or PHP file, which code to use and how, and in last how to call your code in your magento website.
Any ideas will be appreciated, thanks.
You please create an attribute (davinchi) in admin side for these functionality. You can create products attributes from catalog->attributes->menu.After that you can see these attribute value in product creation page.You just assign it to different products
After that you can either create a module for this. Otherwise just create a phtml file in catalog/product/ folder.
then enter the below custom collection code in it.
$collection = Mage::getModel('catalog/product')->getCollection();
$collection->addAttributeToSelect('*');
//filter codition
$collection->addFieldToFilter(array(
array('attribute'=>'davinchi','eq'=>1),
));
This will load products having attribute value davinchi=1.

Resources