• We are using this plug-in to generate quotes for clients, and for the most part it is working great. The only issue I’m running into is if someone adds items to the cart, goes to the cart page, and then inputs their address to the Order Summary section in order to get a shipping quote, this information is not being captured for user who are not logged in.

    This works for user who are logged in, and doesn’t provide a shipping estimate for user who are not logged in and who do not input their address information. Is there a way to add the shipping information from the order summary section into the quote for user who are not logged in?

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author David Jensen

    (@dkjensen)

    Hello

    Do you have the WC Cart PDF option Capture customer information on checkout enabled within the settings under WooCommerce > Settings > Integration > Cart PDF?

    This would save the fields the user types into on the checkout, even if they are a guest. For your use case, you may want to hide the cart pdf button from the customer until they populate the billing and/or shipping fields.

    Alternatively, you could modify the modal popup on the cart page to include additional fields besides just email.

    Thread Starter josht24

    (@josht24)

    Hi David,

    Thank you for the reply. We do have the option to Capture customer information on checkout enabled. We do want to allow customers to have the option get a quote with and without shipping being populated, so hiding the cart pdf button is not an option at the moment.

    Would I modify the popup by adding code to the modal-capture.php file, or is there a different way to go about that?

    Plugin Author David Jensen

    (@dkjensen)

    You would copy the modal-capture.php file into your child-theme/woocommerce/wc-cart-pdf/modal-capture.php file.

    For the additional field names you add to the modal, if you stick with the default naming conventions it will work with the capture customer info on checkout, e.g.:

    'email', 
    'first_name', 
    'last_name', 
    'display_name', 
    'username', 
    'billing_first_name', 
    'billing_last_name', 
    'billing_company', 
    'billing_address_1', 
    'billing_address_2', 
    'billing_city', 
    'billing_postcode', 
    'billing_country', 
    'billing_state', 
    'billing_email', 
    'billing_phone', 
    'shipping_first_name', 
    'shipping_last_name', 
    'shipping_company', 
    'shipping_address_1', 
    'shipping_address_2', 
    'shipping_city', 
    'shipping_postcode', 
    'shipping_country', 
    'shipping_state'
    • This reply was modified 5 months, 1 week ago by David Jensen.
    Thread Starter josht24

    (@josht24)

    Okay sounds good, we are using the default conventions so that should be easy enough. I will give this a try, thank you!

    Plugin Author David Jensen

    (@dkjensen)

    No problem. Feel free to reply here if you need further assistance

    Thread Starter josht24

    (@josht24)

    I might be doing something wrong, I’ve added those sections to the modal pop-up, and that part works. However, that information does not look to be populating in the actual pdf. Or is that something which is outside of the functionality of the plug-in?

    Plugin Author David Jensen

    (@dkjensen)

    Well by default the addresses do not display on the PDF. The plugin is based around just showing what is displayed in the native WooCommerce cart, though it is flexible enough with some coding to accomodate your needs.

    You can modify the PDF, by copying the cart-table.php file to your child theme, same place as the modal-capture.php file you copied, and then adding the addresses to the cart-table.php file using WC_Customer() methods such as: $customer->get_billing_address() or $customer->get_shipping_address().

    • This reply was modified 5 months, 1 week ago by David Jensen.
    Thread Starter josht24

    (@josht24)

    Ah of course, we actually did that for logged in users already, just not for non-logged in users. I can give that a try.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.