Please understand that we cannot provide free support for hacks to any of the eShop scripts. Nor can we help you troubleshoot your hacks. We simply don’t have the time. The plugin is free but we have to spend most of our time trying to earn a living.
If you are a coder, all we can suggest is that you refer to the code & its comments.
Thank you for your reply, I appreciate your position.
Best wishes,
Tim
Just in case anyone else is looking to achieve the same thing and wants to be able to set blank product options (i.e. using a single space), here is the solution:
Edit eshop-product-entry.php
Find the following code at the bottom of the file (line 367-378):
if($stkav=='1' && (trim($eshop_product['sku'])=='' || trim($eshop_product['description'])=='' || trim($eshop_product['products']['1']['option'])=='' || trim($eshop_product['products']['1']['price'])=='')){
delete_post_meta( $id, '_eshop_stock');
add_filter('redirect_post_location','eshop_error');
}
if($stkav=='0' && trim($eshop_product['sku'])=='' && trim($eshop_product['description'])=='' && trim($eshop_product['products']['1']['option'])=='' && trim($eshop_product['products']['1']['price'])==''){
//not a product
delete_post_meta( $id, '_eshop_stock');
delete_post_meta( $id, '_eshop_product');
}
return;
}
?>
Replace with the following code (taken from a previous version of eShop):
if($stkav=='1' && ($eshop_product['sku']=='' || $eshop_product['description']=='' || $eshop_product['products']['1']['option']=='' || $eshop_product['products']['1']['price']=='')){
delete_post_meta( $id, '_eshop_stock');
add_filter('redirect_post_location','eshop_error');
}
if($stkav=='0' && $eshop_product['sku']=='' && $eshop_product['description']=='' && $eshop_product['products']['1']['option']=='' && $eshop_product['products']['1']['price']==''){
//not a product
delete_post_meta( $id, '_eshop_stock');
delete_post_meta( $id, '_eshop_product');
}
return;
}
?>
Plugin Author
elfin
(@elfin)
we DO NOT recommend you ever edit core files of the plugin as they will get overwritten the next time you upgrade.