Support » Plugin: WP eCommerce » Apostrophes in E-commerce not showing correctly

  • Resolved MagicFire



    I have a problem. This code

    $sql = $wpdb->prepare( "
    		SELECT {$selects}
    		FROM {$wpdb->posts} AS p
    			p.post_type = %s
    			p.post_parent = %d
    	", 'wpsc-product',$product_id );

    gives me this:

    SELECT pm.meta_value AS price, pm2.meta_value AS special_price FROM wp_posts AS p INNER JOIN wp_postmeta AS pm ON pm.post_id = AND pm.meta_key = ‘_wpsc_price’ INNER JOIN wp_postmeta AS pm2 ON pm2.post_id = AND pm2.meta_key = ‘_wpsc_special_price’ WHERE p.post_type = ‘wpsc-product’ AND p.post_parent = 4705

    The problem is with the double quotes or apostrophes. Both are returned bad. Is this a WP or E-Commerce problem?


Viewing 1 replies (of 1 total)
  • Plugin Author Justin Sainton


    I suppose that depends – if you’re copying the code from somewhere that has converted single quote characters to their typographic “apostrophe” counter-part, and that’s not getting parsed correctly – that’s a problem with copying code. Single/double quotes should be just fine in the code above.

Viewing 1 replies (of 1 total)
  • The topic ‘Apostrophes in E-commerce not showing correctly’ is closed to new replies.