Additional Checkout Form Fields Not Saving to Category or Showing with Variation

This topic is: not resolved

This topic contains 13 replies, has 6 voices, and was last updated by  dolec 1 year, 8 months ago.

Viewing 14 posts - 1 through 14 (of 14 total)
Author Posts
Author Posts
May 7, 2011 at 4:55 am #104824

Copernicus

I’ve been having several problems with the “Additional Form Fields” functionality (using v3.8.2 with the Gold Cart Plugin).

Foremost, I am not able to assign the additional form fields to a category.

  • Under “Edit Product Category > Checkout Settings >Category requires additional checkout form fields,” I’ll select the appropriate form field name and then click “Update.”
  • I’ll receive the “Item Updated” success message.
  • If I click back in to the “Edit Product Category” interface for the newly edited category, the “Category requires additional checkout form fields” drop-down just displays “None.” and the fields are NOT added during checkout.

Secondly, there is a problem that products with variations will not show the additional checkout form fields as expected.

  • Since I upgraded from an earlier version, some of my “Additional Checkout Form Fields” came through, working just fine on products without variations
  • However, any product with a variation would NOT show the additional checkout form fields as one would expect

Anyone else experiencing this or, ideally, have a solution?

May 9, 2011 at 4:54 pm #104825

jRayx

Hey Copernicus, I just ran into this issue literally an hour after you posted this. I’ve solved the first part of the problem and only just now reached the same conclusion as you regarding the second issue.

In “wp-e-commerce\wpsc-admin\includes\save-data.functions.php”, for me its on line 612:
if ( ! empty( $_POST['use_additonal_form_set'] ) ) {
just change it to :
if($_POST['use_additonal_form_set'] != '') {

That should solve category addition checkout fields saving for you. I’ll get back on here once i figure out the second issue. My php coding skill is like…4 years rusty :P

May 10, 2011 at 6:53 am #104826

jRayx

Bah, this code is so fun to work in ;) I had a quick fix which added an extra link between the variation and the variation’s product category. That only means you end up with categories reporting tons of products unless i clean up that code to check relation types. I’m working on a cleaner fix. I’ll get back on here once i’ve got it down.

May 10, 2011 at 7:43 am #104827

Copernicus

Thanks for your on-going efforts & update. I’ll keep an eye out for your next fix!

May 10, 2011 at 8:00 am #104828

Copernicus

Update: I just deployed the fix you’ve posted for the connection of the “Additional Form Fields” with a product category on the admin side. While it does work in accurately updating the “Category Settings > Category requires additional checkout form fields” dropdown, the fix does NOT change the display of the form fields on the public side (so the checkout form is still just the default form regardless of what’s reported by the “Category Settings” section in the admin area).

May 10, 2011 at 8:15 am #104829

jRayx

Second issue fix…

in “wp-e-commerce\wpsc-includes\cart.class.php line 1651 looks like this :
$category_data = get_the_product_category($product_id);

Add this snippet after that line :

// Check if this post has a parent and try to pull parent categories
      if (count($category_data) == 0 && $product->post_parent != 0)
      {
          $category_data = get_the_product_category($product->post_parent);
      }

May 10, 2011 at 8:18 am #104830

jRayx

So the first fix for saving categories didn’t work for you on a product without variations? It worked for me on a single product with no variations, but when i added variations it stopped working. So i dug more and the fix i just posted for cart.class.php in conjunction with the save-data.functions.php fix should work for you.

May 10, 2011 at 10:08 am #104831

Copernicus

Awesome. THANK YOU!
This seems to be working brilliantly. And, yes, you’re right, both fixes are working now just as you’ve described.

Thanks again!

May 10, 2011 at 12:36 pm #104832

jRayx

You’re welcome ;) Glad I could help.

May 14, 2011 at 6:00 am #104833

waylaydesign

Just wanted to say thanks jRayx. Hunted and hunted for this fix. Editing the cart.class.php worked like a champ.

June 22, 2011 at 5:05 am #104834

dijitul

I also wanted to thank you..

Your fix means we can now save the category option “Category requires additional checkout form fields”

YOu ROCK!

June 28, 2011 at 2:50 am #104835

bpluijms
New Member

Hello,

I am still not be able to show additional fields on checkout when using variations.
I tried both codes from jRayx, but still no luck.

Someone who could point me in the right way?

September 8, 2011 at 10:35 pm #224062

dolec
New Member

still not saving in version 3.85

September 8, 2011 at 10:39 pm #224063

dolec
New Member

i tried isset(use_additional_form_set) andnow is working

Viewing 14 posts - 1 through 14 (of 14 total)

The forum ‘3.8 Stable Release’ is closed to new topics and replies.