wp-e-commerce / wpec-theme-engine-v2

WPEC Theme Engine V2 (aka a tester Plugin for Theme creators and WPEC 3.9)
5 stars 6 forks source link

Replacement for [add_to_cart=ID] shortcode? #21

Closed jjeaton closed 11 years ago

jjeaton commented 11 years ago

Will the Theme Engine v2 have a replacement for the add_to_cart shortcode in v1?

I'm building a plugin that will integrate with WPEC and I need to add an add to cart button outside of a single product page or archive, and want to support the v2 theme engine.

The shortcode I'm referring to is: add_to_cart_shortcode in /wpsc-components/theme-engine-v1/helpers/ajax.php

instinct commented 11 years ago

Yes it will.

Sent from my iPhone

On 17/07/2013, at 3:39 AM, Josh Eaton notifications@github.com wrote:

Will the Theme Engine v2 have a replacement for the add_to_cart shortcode in v1?

I'm building a plugin that will integrate with WPEC and I need to add an add to cart button outside of a single product page or archive, and want to support the v2 theme engine.

The shortcode I'm referring to is: add_to_cart_shortcode in /wpsc-components/theme-engine-v1/helpers/ajax.php

— Reply to this email directly or view it on GitHub.

instinct commented 11 years ago

Is this done / can it be closed?

jjeaton commented 11 years ago

The shortcode is there now [wpsc-add-to-cart]. Is there an argument to have it not use the quantity field, and just display an add to cart button like the old shortcode (defaulting to a quantity of 1)?

instinct commented 11 years ago

That would be good wouldnt it... @garyc40 would need to respond to this though. I'm not sure.

jjeaton commented 11 years ago

If the answer is just to hide the quantity field with CSS, that's fine too.

I'm guessing having just the button would only work for simple products, as variations would need to be selected from drop-downs to get the add to cart to work, so maybe having just the button isn't the best approach...

instinct commented 11 years ago

Lots of products don't have variations though.

jjeaton commented 11 years ago

So, hiding the quantity field with CSS is easy enough to do. It's really just a nice-to-have if there were an attribute on the shortcode to show_only_button=true or something. The add to cart shortcode is there, so this can be closed.