It's quite the complicated issue, so let me dissect it into steps:
1) We're sending cart data (including Gravity Form attributes) from WEBSITE_A (source) to WEBSITE_B (target) using the WP REST API.
2) Cart data is sent from WEBSITE_A and received on WEBSITE_B successfully. The data is received on WEBSITE_B as a JSON object: https://jsonblob.com/83fac8e3-48c1-11ea-b41a-4f98a26d7b37
3) Products on both WEBSITE_A and WEBSITE_B are identical but, obviously, each product's ID is different. Therefore, we add products to the user's cart by matching on sku, the sku can be found in the above JSON Blob link.
4) However, something similar needs to be done to attach the "gravity_form_attributes" (in the JSON object) to the Gravity Form forms of the corresponding products. The product forms on WEBSITE_A and WEBSITE_B are NOT identical, so we'll need to find a way to populate a product's form attributes with data from above JSON object.
Is there any way to achieve this? The Gravity Forms documentation doesn't help either and their support told me to hire an external developer.
Related
I am building a store website that has implemented sorting and filtering products with ajax. In fact, with ajax I send a request to the server and receive the filtered products and place them in the view. Now I have a problem. In fact, when the product filter is applied, I click on a product to see the page of that product. After viewing, when I try to go back to the products page, all the filters or sorts disappear and I have to apply the filters again from the beginning.
What is the solution to this problem?
There are two ways you can archive that.
You can set the sorting and filtering values in the
session on the server OR In local storage through JavaScript and reuse them while coming back to products page.
I've got a great form set up to allow the building of a complex product and then add it to the cart (using the GForms Product Add on). All lif this is perfect on the actual Woocommerce product page.
What I'd love to do is have this form embedded on a page and populate the Product ID dynamically, so that the form still picks up the product details and will add the new Item to the cart just as it does on a shop page. Having it on its own page (or on any page of the site) will allow us to offer a larger, focused experience to select all the options.
I've been looking into the code and the docs but I can't seem to make it work. The code references product_id everywhere, but the dynamic field option is name. So is this possible? Thanks!
If the data you are attempting to map is simple then the following snippet plus Gravity Forms default {embed_post} and {custom_field} merge tags can get you there:
https://gravitywiz.com/dynamic-products-via-post-meta/
If your data is more advanced (like mapping product attributes), check out Gravity Form Populate Anything:
https://gravitywiz.com/documentation/gravity-forms-populate-anything/
I am using fancy product design plug-in for woo commerce in my wordpress site.
After an succesfull order, fancy product data is saved in order_items_meta table with fpd_data key.
I manage to fetch data through order number and want to show final images(canvas) in my print for delivery note(print invoice/reciept) from fpd_data.
Original fetched data is in this format:
"{\"product\":[{\"title\":\"Marshmallow View\",\"thumbnail\":\"https:..........
After stripslashes(), i am getting :
{"product":[{"title":"Marshmallow View","thumbnail":"htt...........so on
Thanks in advance.
I am trying to build a cart inside angular. What I want is to retrieve the cart items from woocommerce as json so I can use it in the angular framework. I have search the woocommerce api documentation but couldn't find anything about cart data.
As per their documentation at the following address:
http://woothemes.github.io/woocommerce-rest-api-docs/
I believe the part you will want will be under "Orders". The list of properties are there.
I am new to the forum and have little time for magento development , 'm a programmer in a company and a customer states that his shop has a selection of the delivery date on the product page, add to cart before him , and that this option follow further up the order, he put into the administrator needs to manage holidays, days in advance of the application all set for a csv with her affiliated stores , I managed to create a module and do it however I ended up with a big problem , I can not save the two fields that need to save are in the product page ( zip code and date) in the order in theory would be fields that can be changed like the qty ( quantity) and would have to be transferred to the session / cookie yet saved, and this is the big problem , unable to somehow save these fields , in practice I would have to double the qty field changing its name and save it in the application ( creating a new field in db ) this was the only solution I found but still unable .
This is a link to a product in the store with two fields : "http://foxflores.com.br/inde.php/caixa-de-chocolates-ferrero-rocher-super-luxo"
someone would have a light for me to save these fields in order?
If I understand your problem correctly, then you added that two fields, to the template only yet. And you want to save those two fields, against the items, as I assume the customer could add to the cart multiple items also.
The easiest solution is, that you create for the products, two custom options in the backend (Magento), you hide those fields, in the template with css, and write the value of your custom fields into them.(You can do this with js). Let me know if you need a help with the js.
With this, your fields values will be saved against each orderitem, in magento.
EDIT on 12/02/2014
Yes, you can add the custom option in the Magento admin , Manage product section. See image.
After this is added: You can add something like this to the frontend to copy over the values, from your custom field, to this newly generated fields.
$('options_1_text').observe(
'change', function () {
var val = this.value;
$("yourcustomfieldid1").value=val;
});
Of course you need to edit the element ids to get it working. And you need to hide the newly created fields on the frontend.
Hope this helps!