• Ian Holt

    (@imcaufieldholt)


    Hi,
    I’ve created a product which has 2 custom attributes, a latitude and a longitude.
    Now I would like to create a custom single product page which has a Google Map on it. The user creates a marker at a location.
    All of the above I can easily do and I am pretty good with PHP and JS.

    Now the bit I can’t figure out, is the interaction with WooCommerce.
    So, I can display the price on the page and I can display the “Add Cart” button ([add_to_cart id=”99″]) using a shortcode, but how do I add my order to the cart and include the coordinates as the custom attributes for the ordering system.

    If I was using a REST API I might do:
    http://mysite.com/addtocart.php?productid=99,latitude=x,logitude=y

    Not the best example, but I hope you get the idea.

    Hopefully that makes some sort of sense.

    http://wordpress.org/extend/plugins/woocommerce/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Customised single product page’ is closed to new replies.