Set default item variations and pricing issues ( Wordpress plugin )

TLCGCTLCGC Member
in General edited June 18
Several questions involved here...

Using the WP plugin to configure a product, when looking at the frontend I see that the user must manually select an item from the dropdown, even if the first/top item in the dropdown is the one they want (if they don't proactively choose the first option it still throws an error when trying to add to cart). So my thought was the make the first option be "Select Your XXXXXX" to prompt the proactive selection.

Moreover, a price modification in our use case only really works if we set the item price to $0.00 and then each variation line item is "+ whatever the price is"

....is it possible to set one of the variations as the default selection?

or is it possible to have a $0.00 priced item and NOT display the 0.00 price until the user selects one of the variations from the dropdown?


screenshot of current item config and frontend https://take.ms/PfH8V

Finally, I noticed when using these WP add to cart buttons, it goes straight to checkout instead of the rightside popout overlay cart summary, as shows when using the foxy href links. Is that

Comments
  • fc_adamfc_adam FoxyCart Team
    @TLCGC,

    Good questions!
    is it possible to set one of the variations as the default selection?
    Currently FoxyShop does assume that the first option of a required dropdown is a blank "Please select an option" choice. If you turn off the "Make field required" checkbox, that will allow you to have a default option for the dropdown.
    or is it possible to have a $0.00 priced item and NOT display the 0.00 price until the user selects one of the variations from the dropdown?
    Not natively - but you could use some javascript to hide the price if it's $0. Alternatively, you could set the product's default price to it's cheapest option, and then change your variations to set the price {p:95} rather than add it {p+95}.
    Finally, I noticed when using these WP add to cart buttons, it goes straight to checkout instead of the rightside popout overlay cart summary, as shows when using the foxy href links.
    Looking at your website, I can see what you're describing - with the add to carts loading the full-page cart instead of the sidecart display.

    Reviewing the page, it looks like you have two copies of the loader.js inserted in the page. FoxyShop will automatically include that file for you, so if you've manually included it on the page too, you can remove your manual addition and just rely on the one FoxyShop adds.

    If that doesn't fix it - there also looks to be a javascript error on the page coming from script.js. That may be preventing our javascript from initializing - you could try fixing that issue to see if that gets it working.

    If after correcting those two things it's still not loading the sidecart, let us know and we can take another look for you.
  • TLCGCTLCGC Member
    Thanks I'll look into those solutions. In the meantime @fc_adam , is it possible to insert the foxio add to cart buttons and dropdowns as a snippet? as opposed to an entire custom post. I'd prefer to just insert the dropdowns and add to cart button into our current Pages
  • brettbrett FoxyCart Team
    Hi @TLCGC. I apologize in advance if I'm misunderstanding the use of the word "snippet" in this context, but it's totally possible to add Foxy add-to-cart links/forms wherever you'd like. These pages might help:
    https://wiki.foxycart.com/v/2.0/products#using_forms
    http://wiki.foxycart.com/static/redirect/cheat_sheet

    Ultimately, so long as you can build the link or form, Foxy can handle it. Note though that FoxyShop will automatically sign the links/forms to prevent tampering. If you do it manually, you can use the "sample code" page in the admin to paste HTML in and have our admin sign it:
    https://wiki.foxycart.com/v/2.0/hmac_validation
    Signing via the admin:
    https://wiki.foxycart.com/v/2.0/hmac_validation#manual_signing_via_foxycart_administration

    It might be easier to work within FoxyShop, fwiw. We're happy to help either way.
  • TLCGCTLCGC Member
    @brett I'd like to be able to configure the product variations/dropdowns in the WP editor, but insert the foxy dropdowns & add to cart buttons into my other pages by use of [shortcode] perhaps
  • fc_adamfc_adam FoxyCart Team
    @TLCGC,

    Thanks for the additional details. FoxyShop does have a few shortcodes that you can make use of, which are detailed here: https://www.foxy-shop.com/documentation/widgets-and-shortcodes. I hope that helps!
Sign In or Register to comment.