Magento - Some products not for sale - magento

I would like to set some products to "non-saleable", removing the "Add to cart" button and adding a link to contact form.
I'm looking for this solution for a few weeks. Searching, I found this post:
Magento - product that are not for sale
At the end of page have this answer:
""Alternatively, you could set up a new product attribute that replaces the add to cart button with something different (more info button, popup, etc)."
How can I do it?
Another post about this subject:
http://www.e-commercewebdesign.co.uk/blog/magento-tutorials/non-salable-products-with-attribute-sets.php
But I can't make it work. Someone could help me with more details?

small tutorial
Create a new attribute "saleable"
Default Value = yes
Unique value = no
values required = yes
apply to = all product types
use in quick search = no
use in advanced searched = no
comparable on front-end = no
Use In Layered Navigation = no
Use for Promo Rule Conditions = no
Visible on Product View Page on Front-end = no
Used in Product Listing = no
Used for Sorting in Product Listing = no
Manage titles
admin = "Is saleable"
Default store view = "Is saleable"
Now add it to your attribute set (default)
create a product or edit a product and define the is "is saleable" attribute.
Now go to the view of your product
/tomcollins.be/app/design/frontend/default//template/catalog/product/view.phtml
put an if statement like this
<? if($_product->getData('saleable')): ?>
// do what ever you want
<?php else: ?>
// do what ever you want
<?php endif; ?>
Hope this helps someone :)
bye

Modify your product with an Attribute for example nonsaleable. If that Attribute has value true the product is not saleable.
So now you should take a look at the
Productview in app/design/frontend/your_theme/your_theme/template/catalog/product/view.phtml
and the
listview app/design/frontend/your_theme/your_theme/template/catalog/product/list.phtml
Now look where in these files are the addtocart buttons are located.
Before this button you place an if nonsable === TRUE { make something } else { addtocart }
Thats the way i would try this.
Sorry for my bad english. I'm still tired :))))

For all non-for sale products you can set a quantity to 0. It will automatically remove Add to cart. Then you can add link to contact form on all products where add-to-cart doesn't exist. I am coming from Magento Go background so I would do it this way, but I know that with community and enterprise versions you have more flexibility.

I guess you will get your desire requirement through this extension because the developer teams for this extension is really very supportive.Please refer below link for extension:
Click here to get extension

Related

Magento - Product Configurable As In www.victoriassecret.com

I am looking for solution or extension for my Magento store.
I need a feature that customer could add product with different product type more than one time.
victoriassecret.com has it and it is really cool feature.
It is named "Add More at a Time"
For ex: http://www.victoriassecret.com/panties/5-for-26-styles/thong-panty-allover-lace-from-cotton-lingerie?ProductID=187902&CatalogueType=OLS
I tried to create Grouped, Configurable, Bundle in magento but it doesnt work the same.
Please could somebody to help ? :)
Thank you!
I am suggesting the logic which came in my mind.
I think you need to do customization in product details page. You need to fetch all configurable options like Color size , which will match the sku.
suppose , you have one product called , "thong-panty-allover-lace-from-cotton-lingerie".
If you have three colors , you need to add three products,
thong-panty-allover-lace-from-cotton-lingerie-blue
thong-panty-allover-lace-from-cotton-lingerie-red
thong-panty-allover-lace-from-cotton-lingerie-green
You have to do coding and logically and need to find sku like "thong-panty-allover-lace-from-cotton-lingerie".
Your customized code will be something like this
<?php
if($_REQUEST['CatalogType']=="OLS"){
....
...
$sku = "some value";
fetch sku of product id " 187902 "and fetch other products which SKU is like $sku.
After this , in loop , create HTML and SIZE and Color dropdown of each product.
and on add button , add that product in cart separately.*/
}
?>
Hope this will helpful for you.
I have just shared my thought , how you can proceed further , from my point of view.

Magento: Product dynamic price change on add to cart

I'd like have a product that is basically a calculator, which I will build in Javascript. I want the add to cart process to grab the generated price from the page and submit it to the cart - which is as far as I have got.
I've created an observer to hook into the checkout_cart_product_add_after event and update the quote item price based on a field value in the submitted form, which works.
The problem I have is that, if you add a second or multiple versions of the item with different prices, it updates all the other versions in the cart to the same price - so you can never have multiples of the same item in the cart with different prices.
Anyone have any ideas? Here's the code in my observer:
public function modifyPrice(Varien_Event_Observer $observer) {
$customprice = $_POST["customprice"];
$item = $observer->getQuoteItem();
$item = ( $item->getParentItem() ? $item->getParentItem() : $item );
if ($customprice > 0) {
$item->setCustomPrice($customprice);
$item->setOriginalCustomPrice($customprice);
$item->getProduct()->setIsSuperMode(true);
}
}
I think the only way to get this working is to dynamically create a new product with a new price or you try to work with attributes which replaces the price, whereas you have to code this logic into your shopping cart as well as in your checkout.
Thank you to McNab, I followed the route of adding custom options to each item added to the cart to overcome the problem with it overwriting the price - which worked perfectly.
Furthermore, I decided to actually grab the options selected on the product page that the JS uses to generate the custom price, and replicate that price generation on the back end based on the selected options. Using the following instructions to add the custom options to the product on the fly, before it's passed to the cart:
Magento - Quote/order product item attribute based on user input
This makes the price calculation much more secure, the selected options are then shown in the cart and order details, and there's no price overwriting issue!
My first question on Stack Overflow and it's hell of a community, thank you all.

Magento custom Product Attribute

I add an attribute type Yes/No is_special to product.
(I want to just logged user can see special products.)
Then, I open some products and set to Yes But when I show it on front end, All is No.
I clear cache and reindex before. But It still No
Please help me guys. I am very grateful to You...!!
Thanks In Advance...!!
When attributes are added, they are added to the database and magento caches the calls to certain databases. Try deleting your cache folder in var/cache and see if that helps.
When you create a new product attribute, you have a lot of options, a few changing the loading bahavious "Show in product listing" sets the collection to load this on the category pages, "Visible on Product View Page on Front-end" loads the attribute on the product view page.
First you need to add featured/special product attribute to magento. Please refer my tutorial which explains how to add yes/no attribute.
http://www.pearlbells.co.uk/adding-custom-product-attributes-in-magento/
Then you filter the featured products using the code in phtml.
<?php
$featuredProducts = Mage::getModel('catalog/category')->load($category_id)
->getProductCollection()
->addAttributeToSelect('*')
->addAttributeToFilter('featured_product', 1)
->addAttributeToFilter('status', 1);
?>

is it possible to show custom attributes of associated products under a grouped product in front end? (Magento)

I have a typical condition in my magento Grouped product.
Is it possible to show Custom attribute (color dropdown) of associated product under Grouped products in the fronted.. as shown below
Consider the sample blanket product
Let me know if i am not clear.
Thanks
It's not clear your question but I would give you a small example to get text field, multiple select or drop-down listbox value.
First, we should load the product collection :
<?php
// load the product that id 125, then show attributes of the product
$product = Mage::getModel('catalog/product')->load($this->getProduct()->getId(125));
echo $product->getCustomAttribute();
// lets say your custom attributes name is "size" and type is text field
echo $product->getSize();
// lets assume your custom attributes name is "product_size then
echo $product->getProductSize();
// lets assume your attribute type is drop-down, this will get array of attribute options instead of value that you selected
echo $product->getAttributeText(product_size);
// to get drop-down value that you selected
$attribute = $product->getAttributes();
$productSize = $attribute['product_size']->getFrontend()->getValue($product);
let me know if it's not meet your request.
I have found a solution for this, 3 edited files.
But these files are edited for a previous version of Magento, I don't know which version.
I have uploaded this 3 files on my Magento 1.7 and it works but when add the product to the cart it give's a error with app/code/core/Mage/Sales/Model/Quote.php
This file: Quote.php is one of the edited files, when i upload the original Quote.php it works.
Look at this pic: http://s8.postimage.org/g8bvbth0z/Naamloos.png
But maybe i get more errors in the future, i don't have any ideas..
I am a noob with this, if someone can look at the edited files and chek how they have do this and compare this with the newest files for Magento 1.7 maybe we can help to many peoples with this problem.

How to change the product display order in magento

How can I change the product display order in the front end (grid or list) by setting some preferences from back-end? I guess it should be other than best value and name from the default Magento display order property.
I tried by creating a new attribute called display_order, and each product holds a value based on its value the product needs to shown in front end. However, it is not working. Please help me fix this.
You'll need to extend the Mage_Catalog_Block_Product_List block to provide your own functionality for the getProductCollection() method. Probably something along the lines of:
class ... extends Mage_Catalog_Block_Product_List {
function getProductCollection() {
parent::getProductCollection()->addAttributeToSort('display_order', 'ASC')
}
}
Then, of course, you'll have to update you layout xml file on your, presumably, custom controller (unless you want all of the product listing screens to act like this) to use your new block instead of the Magento default of catalog/product_list.
Why don't you use the Magento sorting thing ?
In your category, under Category Product you have the possibility to choose the sorting order in the last column. To do it through php, just make a custom script that you'll need to launch once.
$collection = 'Your product collection';
$result = array();
foreach ($collection as $product) {
$sort = 'Your way of calculating the desired sorting';
$result[$product->getId()]=$sort;
}
Mage::getModel('catalog/category')->load('your category id')->setPostedProducts($result)->save();
And that's it :)
To change the display order , first you need to set the default sort by option to position.This can be done from the magento admin configuration.After that you need to set position for all the products starting with the value 1.
I come across the following module which will make this task very easy, just by drag and drop the products from the manage categories itself.Please check the following extension
http://www.blackqubers.com/extensions/product-sorting-drag-and-drop.html
Hope this will helps you

Resources