Final image form fancy product design fpd_data? - php

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.

Related

Gravity Forms attach cart item attributes programmatically

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.

Dynamically pass a Product ID as the main Product Field on a Gravity Form (Product Add On)

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/

Adding Google Image search button to Wordpress site

I want to create an e-shop and I want to redirect customers to google images to see photos of the produc (if there are). How can I retrieve the product sku and provide a button which directs (in a new tab) customers to google images search results by that sku?
thanks in advance
Google Image search can be done on your page by going through this tutorial on Google's website TUTORIAL
As far as retrieving the product SKU, that depends how you saved the product SKU in the database. If you are talking about the manufacturer's barcode, I don't think you can just magically come up with that. You should save the barcode in a custom field for each product in your database, then call the custom field using the Wordpress function get_post_meta

Creating a woocommerce store that gets products from another website

I am in need of guidance:
I need to create a woocommerce store that will get its products from another website like this one. Is it possible to make it to auto update? For example, every time a product is introduced into the first store, the same product will appear in my woocommerce store?
Thanks for your time!
You can try using file_get_contents() to read the other website then you can parse the pages you receive to select the products and display your own page on the fly.

Saving Custom Fields on request

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!

Categories