Set cart link by SKU
-
Hello, thank you very much for the great and simple plugin, it has been a great help in my routine!
In my ERP, we`re creating a function that send an email with the link to fill the cart based on internal rules, but we only can get the SKU of the products.
Is there a way to set the cart link using SKU of the product too? Or even choose if I want to use SKU or Id?
I`m picturing something like: “https://mysite.com/cart?set_cart_SKU=sku1,2Xsku2,3Xsku3”I was trying to change the behavior of the plugin by changing some variable, but I still did not succeed:
“$product_id = $wpdb->get_var( $wpdb->prepare( “SELECT post_id FROM $wpdb->postmeta WHERE meta_key=’_sku’ AND meta_value=’%s’ LIMIT 1″, $add_to_cart ) );”P.S.: My code skills are not so good…=(
Thank you in advance!
- The topic ‘Set cart link by SKU’ is closed to new replies.