• Resolved iboxsolutions

    (@iboxsolutions)


    Hello,

    I noticed you implemented the following fix a while back:

    6.2.15
    * *fixed* product details can no longer have just a single space.

    Would you be able to point me in the direction of how I might ‘undo’ this fix in the latest version.

    I use eShop to sell images in various formats / sizes, which I have set up as an option set so that I don’t have to keep entering them. I set the base product option / details as a space with the price of 0. Example here

    The other option of course would be to not output the product option / detail on the product listing. Again, any advice welcome.

    Thank you in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • esmi

    (@esmi)

    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.

    Thread Starter iboxsolutions

    (@iboxsolutions)

    Thank you for your reply, I appreciate your position.

    Best wishes,

    Tim

    Thread Starter iboxsolutions

    (@iboxsolutions)

    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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Allow product option / details to contain a single space.’ is closed to new replies.