Hello,
I have implemented the SKU mod (node775).
The price comparison works ok when a SKU is provided.
But for the products with no SKU it just goes straight to the cheapest product. The name of that product is completele different, so i think the comparison is now made on the emty SKU field?
Can you give me a hand with this one?
Regards,
Marco.
Hi David,
The products.php file you send works great.
Thanks a lot!
Marco.
Hi David,
Quick question on this. I believe I have the same modification as Marco on this but I noticed a couple of my feeds have inserted blank sku's of " " (10 spaces) instead of just blank. How can I match these characters to exclude them from the search. My current code looks like:
if ($rows[0]["sku"] && $rows[0]["sku"] !== "000000000000" && $rows[0]["sku"] !== " ")
I tried adding that last part but it doesn't seem to work. How do you match "blank" characters in a MySQL field?...
Thanks! -Joe
Hi Joe,
I'd do it by stripping out spaces from the SKU field before the test, for example:
$rows[0]["sku"] = str_replace(" ","",$rows[0]["sku"]);
if ($rows[0]["sku"] && $rows[0]["sku"] !== "000000000000")
Cheers,
David.
Thanks as always David, your support is amazing! I don't know how long it'd take to figure this stuff out without you?! (too long!) :S
-Joe
Hello Marco,
Just so I can be completely sure what code you're using, could you email me your search.php and products.php and i'll take a look for you...
Cheers,
David.