Purchase Order By Default

chesterpchesterp Member
in Help edited November 2015
Good day,

I have a site which needs to have the Purchase Order enabled if certain option on the Product page is selected. I was able to hide the main credit card fields and show the PO radio option. However I cant display the whole Purchase Order fields on page load, I still need to check the pay by Purchase Order radio to show the PO Field. When I simply hide that PO, im getting a required validation message. What Im wanting to do is to select the PO option by default.

Thanks in advance
  • fc_adamfc_adam FoxyCart Team

    Just to confirm with you - are you wanting to show only the purchase order as a payment method for certain products, but for any other products, display the normal credit card payment options and not the purchase order method. Is that right?

    Also - which version of FoxyCart are you running?
  • @fc_adam

    It really depends, on my product page, the user will have an option Like pay with credit card or other payment method, if he choses other payment method Im showing Pay by PO, if he chose credit card Im showing cc on checkout and hide pay by po. There's no problem on that part.

    My Concern is on the checkout page already, where I already show Pay by PO, I dont want the user to click the radio option to disregard the validation message, I want to enter a value on my script when page load and automatically chose the radio option.

    Im using fc 2.0
  • http://screencast.com/t/UCIGyyvd
    I hope this screenshot helps. I want it on page load without me clicking the option.

    Thanks @fc_adam.
  • @fc_adam

    I was able to clean up my code to show and hide credit card details and pay by PO using the thread below.

    Im now on the scenario where I need to pre-select purchase order option is available on page load. I tried to copy the code you suggested on the last part of the thread but it didnt work.
  • @fc_adam
    No worries, I figured it out

    FC.json.payment_method_type = "purchase_order";

    I added that code to preselect the po
  • fc_adamfc_adam FoxyCart Team

    Awesome - I'm glad you were able to find a solution! Let us know if we can help with anything else.
Sign In or Register to comment.