HI,
WE use your plugin for samples in our store. We just upgraded woocommerce and wordpress but now when an order is placed for a sample, the user is not asked for shipping address and it does not show up in the wp admin when orders are placed. Shipping address is blank. Regular orders ask for shipping address in addition to billing address and show in admin. Can yoiu help?
This plug in is not working on WP 5.4 can you help please?
]]>Like a message in a bottle… I hope someone still watch this support forum, I’d like to modify the code of that plugin so the weight of a sample is considered as zero grams, just to be sure that the shipping costs won’t consider a sample as a full piece. But of course, I don’t know how to do that… Otherwise, my only solution is to create variations of my 300+ products and let go that very usefull plugin but unfortunatly dead ??
Thanks a lot for any help !
]]>Hi Team,
The flat delivery fee is added to the sample, even that I have mentioned the delivery and cost of sample to be free.
Please assist. PHP version of the website 7.1. WordPress – latest
Kind regards
]]>I have been having issues with this plugin not working and it has not been updated for some time. I have managed to fix the plugin by editing the code. I have created a post on my website to help others and also a download link with the files edited.
Here is the post https://www.artificialgrassdirect.co.uk/woocommerce-product-samples-plugin-fix-solved/
Hope this helps everyone and is tested to wordpress 5.0.3 and woocommerce 3.5.3
Thanks Colin
I want integrate this solution to my website but when we add sample product in the cart. It shows product with price while this is sample product so this should appear without price on cart. Please help me
]]>Hi, I know that plugin seems to be abandonned but…
Would someone know how to deactivate stocks decrease on samples sales ?
I sell fabrics by the meter, and for every 1 sample (6 x 6 cm), that decreases my fabric stock of… 1 meter ??
So just imagine the mess it is.
Also… Would someone have found a better alternative to that plugin ?
Thanks a lot !
]]>Hello, we are using your plug-in in one of our websites, and we found it very useful. However, there are some functionalities that we would like to have. Are you interested in developing those features for us, for the additional fee of course?
]]>Here is a little loop to add the sample option to multiple products
This will set the sample price to 0.50
Please note, if you set a category with a lot of products this may break the internet
<?php
$args = array( 'product_cat' => 'your-cateogry-name-here', 'post_type' => 'product','posts_per_page' => '-1' );
$postslist = get_posts( $args );
foreach ($postslist as $post) : setup_postdata($post);
?>
<?php add_post_meta( $post->ID, 'sample_enamble', "1" ); ?>
<?php add_post_meta( $post->ID, 'sample_price_mode', "default" ); ?>
<?php add_post_meta( $post->ID, 'sample_price', "0.5" ); ?>
<?php add_post_meta( $post->ID, 'sample_shipping_mode', "default" ); ?>
<?php endforeach; ?>
]]>
Thanks to JasperPress
function filter_session($session_data, $value, $key){
if ($value['sample']){
$session_data['sample'] = true;
$session_data['unique_key'] = $value['unique_key'];
//$session_data['data']->price = 0;
$product_id = $session_data['product_id'];
$sample_price_mode = get_post_meta($product_id, 'sample_price_mode', true) ? get_post_meta($product_id, 'sample_price_mode', true) : 'default';
$sample_price = get_post_meta($product_id, 'sample_price', true) ? get_post_meta($product_id, 'sample_price', true) : 0;
if ($sample_price_mode === 'custom'){
$session_data['data']->set_price( $sample_price );
}else if ($sample_price_mode === 'free'){
$session_data['data']->set_price( '0' );
}else{
//default
}
}
return $session_data;
}
I modified line 210 and 212 from:
210: $session_data['data']->price = $sample_price;
212: $session_data['data']->price = 0;
to:
210: $session_data['data']->set_price( $sample_price );
212: $session_data['data']->set_price( '0' );
]]>
Hi,
I installed this plugin with sotrefront theme.
There is a custom field “sample_enamble” I set it on 3 but it still does not work for variable products (colors).
I have this error message : “A sample of the same product is already present into your cart”. Also I have another message for some colors (even if I try for one sample) “invalid value published for color”.
Thank you for help
]]>Hi Guys,
I liked this plugin but We have some problem. When I click the Add Sample To Cart. It’s making double on the cart and also it showing price. I setup free, no price. PLease check screenshots. And also if you want to try your self you can go and try on https://beta.zi-chun.com/products-page/teas/premium-jasmine-oolong-copy/
Thank you in advance.
Best Regards
Harendra
I have set a minimum quantity for a product to 10 pieces. When I click the Order a Sample button I get a warning that says “The minimum allowed quantity for product is 10.”? So, it won’t let me add 1 sample to the cart. If any one try add only just sample product then it was not allow to product in cart.
]]>The plugin appears to no longer work on new products.
]]>Hi,
I have installed this plugin on a network site and when within the plugin section i receive this:
WooCommerce Sample requires WooCommerce to be activated in order to work.
I do have it installed and up to date…
Anyone offer any advice to get this working.
]]>Hi there,
The plugin is causing a ‘No shipping method has been selected’ error on checkout whenever the order triggers free shipping (for a minimum £100 spend). Orders under this amount (subject to £10 flat rate) are all OK.
I’m running X-theme 5.1.1 on WP 4.8 with WooCommerce 3.1.1. Site is live at waltonsmillshop.co.uk. Plugin currently disabled.
Any help greatly appreciated.
Dave
]]>Can you have a custom shipping cost for only the sample product?
]]>Hey! I’m using the WooW theme. When you click on ‘quick view’ when browsing products you get the ‘add sample to cart’ option which is awesome, but it links to a blank page with a ‘0’ in the top left. The sample gets added to the cart successfully. Any suggestions on where to look to fix this would be a big help!
Also, great plugin. It’s saved me hours of work. Thanks!
]]>In woocommerce-sample.php line 395
<input type=”hidden” name=”add-to-cart” id=”sample_add_to_cart” value=”<?php echo $product->ID; ?>”>
should be the below, to be fully WC 3.0 compatible ??
<input type=”hidden” name=”add-to-cart” id=”sample_add_to_cart” value=”<?php echo $product->get_id(); ?>”>
]]>Good Morning,
I upgraded to woocommerce 3.0.5 and using wordpress version 4.7.4. In the Woocommerce Sample Plugin, I am using custom price and free shipping. However, when I add the product to the cart, it is using the full price. I have tried to debug the code in woocommerce-sample.php and can not follow where it is suppose to update the cart price with the custom price. Any help will be greatly appreciated, because I am unable to launch my clients site.
Thanks so much.
]]>This sample plugin is exactly what I need.
Unfortunately with the latest version of Woocomerce (3.0.2_ and WordPress (4.7.3), I can’t get it to work.
Eg, I make a product a sample that is free, select the sample in the frontend shop, but the full price of the product still shows in the cart and checkout.
Is there something I am missing? or is your plugin not compatible with the latest version of Woocommerce and WordPress.
Many thanks in advance.
]]>Sono un web Developer , mi piace moltissimo il plugin , lo uso da molto tempo ormai .
In questi giorni ho incontrato una grossa difficoltà nel inserire nel carrello più sample dello stesso prodotto .
Mi spiego meglio , ho un cliente che vende ceramica online , ed e necessario per lui che possa vendere ai suoi clienti campioni di diversi tipi dello stesso prodotto come : Colore – Grandezza -Finitura , sto utilizzando Measurement Price Calculator .
Mi domandavo se è possibile inserire questa funzionalita .
Ecco uno screenshot dell sito in questione : https://prntscr.com/eo1g7s
Buona giornata ??
]]>There seems to be an issue with the price that is shown in the cart once a sample is added. I have set the price to be 1.90 but it is shown 0.95
]]>it seems that when I already have a product in the cart I can add also a sample of the same product. BUT I can’t do the opposite, i.e. add the product once I added a sample of it. How can I change this to allow for both versions? Thanks
]]>Hi There,
I have been testing out your Plugin and everything is working great.
I will be using Variable Products. Ie Fabric Style and then different colour.
Your plugin restricts to 1 sample per product and doesn’t pick up the difference between a variable colour.
Can you confirm if there would be anything that could be changed to allow for multiple samples purchase? I am happy to allow clients to buy as many samples as they like.
Thanks
Gareth
Hi – is it possible to limit the number of samples ordered?
So if a shop has 100 products and each one has a sample available. The shopper can only add say add 1 sample per product and max 10 samples to their cart in anyone checkout?
thanks
]]>Hi, I want to send different email for sample product order. Can you give me any tips to do this?
I am trying to add a function on this hook woocommerce_order_status_pending_to_processing_notification
and get meta value using wc_get_order_item_meta function. Please take a look inside my code and give any suggestion.
Thanks
add_action( 'woocommerce_order_status_pending_to_processing_notification', 'trigger',10,2 );
function trigger( $order_id, $post ) {
// bail if no order ID is present
if ( ! $order_id )
return;
// setup order object
$to = "[email protected]";
$order_details = new WC_Order($order_id);
$OrderId = $order_details->id;
$items = $order_details->get_items();
$order_item_count = count($items);
$print_result .= "Total Items: $order_item_count ,";
foreach ( $items as $item ) {
if ( function_exists( 'woocommerce_get_order_item_meta' ) ) {
$item_id = $item['product_id']; // <= Here is your product ID
$result = wc_get_order_item_meta($item_id, "product type", true);
$res = $data[0]['meta_value'];
if($res == null){
$print_result .= "<br/>data[0][meta_value] is null";
}else{
$print_result .= "<br/>data[0][meta_value] is not null";
$print_result .= "<br/>data[0][meta_value]: $res";
}
$status = wp_mail($to, "Order Details", $print_result);
$status = wp_mail($to, "Order Details", "message working");
}
}
}
]]>
I have set a minimum quantity for a product to 500 pieces. When I click the Order a Sample button I get a warning that says “The minimum allowed quantity blabla… is 500 (you currently have 0 in your cart).”? So, it won’t let me add 1 sample to the cart. ?Please let me know if there is a way to resolve this. I only want customers to order 1 sample. But when they place an order, they need to purchase at least 500 pieces of the item.
]]>Hi, we use Woo Table Based Pricing (https://plugins.dvelopit.co.nz/woo-pricing-table-importer/) and your plugin, WooCommerce Sample.
However, when we press Add Sample to Cart, it won’t do anything unless we type in a width and height along with a dropdown selection for the measurements / options. Is there any way to bypass this so it will ignore this?
example link: https://makeablind.co.uk/blinds/roman-blinds/alalpardo-amaryllis-web-blinds/
]]>Hi
I’d like to move the sample to cart button position on product page, so it sits above the regular options below the price?
Any help much appreciated – I have no clue
]]>