HasteDesign / Registrations-for-WooCommerce

Add a registration product type to your WooCommerce installation.
GNU General Public License v2.0
38 stars 16 forks source link

Add product via url and/or ajax #20

Closed MihaiCraciun closed 6 years ago

MihaiCraciun commented 6 years ago

Hello again,

Any way to create a link to add a product to cart ? Tried something similar to ?add-to-cart=[PRODUCT-ID]&variation_id=[VARIATION-ID]&attribute_[ATTRIBUTE-NAME]=[ATTRIBUTE-SLUG]&attribute_[ATTRIBUTE-NAME]=[ATTRIBUTE-SLUG] as stated here but didn't work. I added a product attribute for a registration product type but that attribute doesn't show up under WooCommerce > Products > Attributes so I don't have [ATTRIBUTE-SLUG] and [ATTRIBUTE-NAME] Any advice ?

My goal is to add a specific variation of the product depending on what the user selects from a set of drop-downs. They will have to choose some options and based on the combinations I want to add a specific variation to the cart via ajax.