Ask your WordPress questions! Pay money and get answers fast! (more info)

Add extra info from variable to WooCommerce product. WordPress

  • REFUNDED

Im building a WooCommerce webshop and I have unique products, that are generated in the admin system. The unique part is the design. Instead of making a unique product for every design, I created a system that the product image will be looked up by looking up for the $_GET["id"] variable.

The client receives the link with the ?id after it, and sees the product but then with his/her design.. But the problem is, if the user orders the product, I have to store the variable somewhere, but I don't know where and how? Is there something where you can store it if the add it to the cart?

For example the normal product is : http://new.stick-pimping.nl/product/hockeystick and the product with a design is http://new.stick-pimping.nl/product/hockeystick/?id=70


Please let me know!

Answers (4)

2013-05-22

Yakir Sitbon answers:

This is what you need:
http://www.woothemes.com/products/product-add-ons/

Good luck.


rodericks comments:

Thanks for the super fast answer. But they customer does not have to give something, i just want the system to recognize the $_GET["id"] and then give to the order the information "It is product x with $_GET["ID"] of 70".


Yakir Sitbon comments:

I can write code for you, in 50$ minimum.


rodericks comments:

That is not what im looking for. I only want the solution for 5$, that is why I registered here... Otherwise I can let a other developer fix it. I can code myself, only want to know where and what I have to edit..

2013-05-23

Hariprasad Vijayan answers:

Hello,
I think it is not an easy task. It may take time to implement it. The best way to solve this situation is, add it as a product in separate category or tag insted of passing "id" through url.


rodericks comments:

But that will take a lot time.., it is not able to set the tags according to the $_GET["id"] or somethign?


Hariprasad Vijayan comments:

Hello,

Better thing in this situation is creating an alternative product in separate design. Otherwise we need to customize that plugin. Which is more complicated process.

Good luck..

2013-05-23

harry hor answers:

http://bbpress.org/forums/topic/add-field-to-registration-form/

I want to add an extra field to the bbPress registration form but add it to the [bbp-login] shortcode so I don’t have to do a completely custom form (which I could do but seems more of a pain). Any thoughts?

2013-05-23

Eric P. answers:

Do you have your "product" set up with multiple variations? What kind of "id" is that "id=70"?

It looks like you have that "product" set up with no variations for whatever that "id=" represents.

In your product setup. Go to the "Attributes" tab in the "Product Data" section. Add another attribute for that variable and be sure you check the "Used for variations" box (and probably the "Visible on product page" box as well). Then go to the "Variations" tab. Add variations for all possible values of that "variation" attribute.

See [[LINK href="http://docs.woothemes.com/document/product-variations/"]]http://docs.woothemes.com/document/product-variations/[[/LINK]] for information about setting up product variations.


Eric P. comments:

One other thing. "Out of the box," WooCommerce only allows one image per variation. However, there are some additional plugins that work with WooCommerce and allow multiple images per variation.


rodericks comments:

Thanks for the answer. The id=70 is just an ID in a totally different table in mysql called "designs". which is nothing more than the id + 2 urls to images and the WP User connected to it. In the script there is this code that checks if their is a id= and if there is, it only shows the product images.

About your variation tab, is it possible that I add the variation design and that he reads the design from the ID ? or is that not possible?


Eric P. comments:

You'll have to consult with the WooCommerce/WooThemes people about the details.

The "Variations" type product is designed to do exactly what you're trying to accomplish, without any extra coding on your part. You can use it for different colors, different artwork, or even for sizes and other attributes. You seem to have it on the size and model already. Another "variation" for "artwork" or something along that line would just show one more dropdown on the product page to select the artwork. There are plugins that allow multiple pictures per variation, and I think there could be some that allow additional description text.

I think you're fighting against the tool you've chosen and trying to do something yourself that they already did for you. Have you tried the variations? If you need some help with that, I may be able to help you through teamviewer or join.me. It's not terribly difficult once you've done it a few times, but it can be a little bit confusing the first time.

Even if you need to customize things further, you'd be better to customize on the "variations"code than to try to write your own and get WooCommerce to recognize your extensions for the shopping cart.


rodericks comments:

Yeah it would be great if you can help me. Only don't kno how we can set up a teamviewers without having private contact.. ?