Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Samples? 
 
snapey
Jr. Member
 
Total Posts:  5
Joined:  2008-09-21
 

I’m looking to build a site for a customer retailing fabric.

Under each item in the catalog, we would like a request sample link. This will need to be added to the shopping basket since there is a small charge to pay, and some shipping.

Can magento do this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
J_T_
Mentor
 
Avatar
Total Posts:  1961
Joined:  2008-08-07
London-ish, UK
 

Yes, just make it a product option with a low price.

 
Magento Community Magento Community
Magento Community
Magento Community
 
intensity
Member
 
Total Posts:  48
Joined:  2008-11-22
 

I need a similar thing where people can request free samples that also have free delivery, and preferably do this in the shopping cart.  I suppose one way to do this is to do group products for everything that has a sample, but I would prefer not to go that route.  Is there anyone out there who has implemented similar functionality?

 
Magento Community Magento Community
Magento Community
Magento Community
 
zethris
Member
 
Total Posts:  40
Joined:  2009-01-26
 

Right now I am trying by customizing a $0.00 free sample item assigned to the appropriate category and then customize the wording of the free shipping method. I will let you know if this works properly or not.

 
Magento Community Magento Community
Magento Community
Magento Community
 
zethris
Member
 
Total Posts:  40
Joined:  2009-01-26
 

Seems to work fine and make logical sense. Just create an item for $0.00 and list it under the apropriate category (or create one) and then link to it as you would anything else.

Then, make sure the customer knows they can only select the free shipping by wording the free shipping module in magento config to that effect. “Free Sample Shipping” for example.

 
Magento Community Magento Community
Magento Community
Magento Community
 
intensity
Member
 
Total Posts:  48
Joined:  2008-11-22
 

It would be really great if you could do this in the actual product ie “Request sample of this product” link, versus doing it by your method.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ForgetHangovers
Sr. Member
 
Total Posts:  83
Joined:  2009-04-12
Maryland, USA
 

I am trying to do something similar, I want to give away a “Free Sample” however I want to charge for S&H;on the sample…

1.
How do I create a product that is a “Free Sample” (i.e. Price is normally $3, but special price is $0) that will automatically add $2.25 to the shipping totals (no matter how many other items are in the cart and/or the other items qualify for FREE SHIPPING)?

For example, lets say the customer has $50 worth of product in their cart (which qualifies them for FREE SHIPPING), but they also have a “Free Sample” item in their cart, so the shipping total should work out to be $2.25.

2.
Also how can I limit the customer to only have 1 “Free Sample” product in their cart per order.  So that they can’t add more then 1 “Free Sample” to their cart/order.

Thanks in advance,
-Chris

See also: http://www.magentocommerce.com/boards/viewthread/41229/

Is this possible?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Akidallar
Jr. Member
 
Total Posts:  18
Joined:  2009-05-11
 

Did anyone get anyware with this item, I am trying something similar but instead of adding options I am trying to create a new wishlist section that you add sample requests to first then they send the request to the site.

Would be very intereseted to see if anyone else got this to work for them.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Akidallar
Jr. Member
 
Total Posts:  18
Joined:  2009-05-11
 

Did anyone get anywhere with this item, I am trying something similar but instead of adding options I am trying to create a new wishlist section that you add sample requests to first then they send the request to the site.

Would be very intereseted to see if anyone else got this to work for them.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Vicky P
Sr. Member
 
Total Posts:  93
Joined:  2008-02-27
Devon, UK
 

Did anyone get something like this to work?

 
Magento Community Magento Community
Magento Community
Magento Community
 
archmad
Member
 
Avatar
Total Posts:  32
Joined:  2010-04-03
Philippines
 

I have made this through, it’s quite challenging.

Add Order Sample on product page using Related products

Go to admin, create a free sample product, make sure:
1. no category selected
2. name is different from the original product
3. Visibility set to Not Visisble individually
4. Price is 0 or could be any, quantity to 100 or any, Stock availability to In Stock
5. Maximum Qty Allowed in Shopping Cart so user cant order more than 1

Now go to the original product and make the free sample as related products, make sure only 1 is selected.

/app/code/core/Mage/Catalog/Block/Product/List/Related.php line 55 comment it out like below

// Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($this->_itemCollection);

this is because of #3 above, we dont want users to visit the detail page when added to the cart

create a template file in your theme folder
...../template/catalog/product/list/sample.phtml
then paste

<?php if($this->getItems()->getSize()): ?>
<?php 
foreach($this->getItems() as $_item): ?>
     
<a href="<?php echo $this->getAddToCartUrl($_item) ?>"><?php echo $this->__('Order a Sample'?></a>
<?php endforeach ?>
<?php 
endif ?>

open in your theme folder ..../layout/catalog.xml
put code under product view inside <block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml">
this code:

<block type="catalog/product_list_related" name="catalog.product.related" as="sample" template="catalog/product/list/sample.phtml"/>

open in your theme folder ...../template/catalog/product/view.phtml
put this code anywhere you want:

<?php echo $this->getChildHtml('sample'?>

If you are lost, give me a buzz, i may able to help you.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Amasty
Mentor
 
Avatar
Total Posts:  3988
Joined:  2009-11-10
 
intensity - 31 March 2009 08:47 PM

I need a similar thing where people can request free samples that also have free delivery, and preferably do this in the shopping cart.  I suppose one way to do this is to do group products for everything that has a sample, but I would prefer not to go that route.  Is there anyone out there who has implemented similar functionality?

You can use Auto Add Promo Items extensions to automatically add free samples to the cart with a shopping cart rule.  Do you think it could work for you?

 
Magento Community Magento Community
Magento Community
Magento Community
 
kajal
Member
 
Total Posts:  60
Joined:  2010-06-27
 

Hi,

If some one is facing an same issue with adding a sample product , please follow the steps as mentioned below :

Step1 :

Open : catalog/product/view.phtml template file and place the following code to get the sample product button there :

<a href="<?php echo $this->getBaseUrl();?>/order_sample.php?sku=<?php echo $this->htmlEscape($_product->getSku()) ?>" title="Request Sample for <?php echo $this->htmlEscape($_product->getName()) ?>" ><span><span>Order Sample - $1</span></span></a>

Step2 :
Create a file named order_sample.php in the root of your Magento installation.
Place the following code into it :

<?php
require_once 'app/Mage.php';
Mage::app();
        
$sku $_GET['sku'];
        
$product=Mage::getModel('catalog/product')->loadByAttribute('sku',$sku);
        
$copy $product->duplicate();
        
$id_copy $copy->getId();
        
$name $copy->getName();
        
$copy Mage::getModel('catalog/product')->load($id_copy);
        
$copy->setSku('S-'.$sku); 
        
$copy->setName("Sample of ".$name);
        
$copy->setStatus(1);
        
$copy->setVisibility('1');
        
$copy->setTypeId('simple');
        
$copy->setPrice(1.50);
        
$copy->setStockData(array('is_in_stock' => 1));
        
$copy->save();
        
$stockItem Mage::getModel('cataloginventory/stock_item');
        
$stockItem->loadByProduct($copy->getId());
            
$stockItem->setData('is_in_stock'1);
            
$stockItem->setData('qty'1);
            
$stockItem->setData('manage_stock'0);
            
$stockItem->setData('max_sale_qty'1);
            
$savedStock $stockItem->save();
        
$stockItem->load($savedStock->getId())->save();
        
$pId $copy->getId();
        
header("Location: ".Mage::getBaseUrl()."checkout/cart/add/product/".$pId."/");
exit;

Hope this helps. Do let me know if any of you faces issue with the related code.

Happy coding smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
lauralil
Jr. Member
 
Total Posts:  12
Joined:  2009-06-14
 

Just to say that I was scratching my head thinking of how to set up free samples with a small shipping charge which I solved by doing the following.

Set up the item as a sample with zero cost
Set up table rates with weights vs destination
Weight of the samples set to 1 gram then anything under 500 grams is £2.00 delivery - my items are heavy so would take ordering 100s of sample items to push the delivery charges up.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Radweb
Jr. Member
 
Avatar
Total Posts:  15
Joined:  2009-04-19
Portsmouth, United Kingdom
 

Not sure if anyone is still looking for a way to allow customers to order samples but we have just released a module that will do this without the need to add separate products for samples.

You can find the module here: http://ecommerceevolved.co.uk/sample-request

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top