Quantcast
Channel: Opinion: Shopify Community - Shopify APIs & SDKs
Viewing all 25503 articles
Browse latest View live

App Proxy Question by Julian Ellwood

$
0
0

Dear Developers,

I'm a bit frustrated by this whole process of developing an app. First of all because the documentation is never quite up to date so there is always an element missing that you have to spend inordinate amounts of time figuring out for your self and second because I never get a response on any forum that I've posted a question. Yes, I may be missing the obvious but if it is obvious it should take two seconds to respond to my query. That said, I'm creating an app proxy which will be bring back supplementary product information (i.e. print on demand product) information about the images that we sell on our site. I want to include in an iframe on an alternative version of the product page that will show the images that we have on shopify next to the list of print on demand products available from our fulfiller. I've already connected into my fulfillers api in order to pull the available print on demand product information from their system. I've almost completed testing of authenticating with the app (note: I would do this as a private app but there is even less information about what's needed to do that except if your working in ruby. Yes, I can launch the app but I'm not clear as to the process of it showing up in my admin panel - as an embedded app) as a public app. 

My question is that I'm not clear as to what I should include in the src attribute of the iframe tag that would allow the print on demand data to be rendered within the iframe on the product page not as to how I can pass the image of the selected image on the shopify product page so that the mastk can be used to show the user what the finished product would look like.

So for example the path is:

path: apps/pod

and my proxy url is: http:localhost:3000/podproxy

My question is for the iframe what do I put into src attribute so that it will render the print on demand products?

Please somebody respond as these delays are really impeding my ability to get this finished.

Kind Regards,

John B


Display products based on a date by Donald Leiser

$
0
0

I'm looking for suggestions or even a developer who might be able to assiste me with a site that is currently based on Opencart that has 3 custom fields that relate to a date picker. You choose a date and a list of products are presented to the buyer.

We want to move the site to shopify.

How can I use the data I have extracted into a csv file? I'm not a programmer, but perhaps a flat file system of some sort based on javascript could be used? 

I have experience setting up shopify stores, just not sure how to approach the data picker.

[PHP] Problems on massive upload products using WordPress and cURL by Diego Lerma

$
0
0

Hi guys,

I'm making a massive upload way to publish my products on Shopify, I'm using WordPress just to manage some business rules to my vendors, once they publish their products on my WordPress, I run this process once a day, the code is something like this

I delete some lines of code but the process ends like 

$args=array(
		  'post_type' => "producto_shopify",
		  'post_status' => 'publish',
		  'posts_per_page' => -1,
		  'caller_get_posts'=> 1
		);

		$my_query = null;
		$my_query = new WP_Query($args);
		if( $my_query->have_posts() ) {
			while ($my_query->have_posts()) : $my_query->the_post();
/*
Code to complete my $prod array
*/
					$para_shopify = array("product" => array(
					'title' => $my_query->posts[0]->post_title,
					'body_html' => utf8_encode($prod["cuerpo"]),
					'vendor'=> utf8_decode($prod["marca"]),
					'product_type'=> utf8_decode($prod["categoria"]),
					'updated_at' => utf8_decode($prod["hoy"]),
					'published_at' => utf8_decode($prod["hoy"]),
					'handle' => utf8_encode($prod["slug"]),
					'images' => array(
						"src" => utf8_encode($prod["imagen"])
					),
//					'options' => array(
//						"name" => 
//					),
					'published_scope' => "global",
					'tags' => "Demo",
					'variants' => array(
						array(
							'option1' => 'Default',
							'price' => $prod["precio_mio"],
							'compare_at_price' => $prod["precio_marca"],
							'created_at' => $prod["hoy"],
							'fulfillment_service' => "manual",
							'sku' => $prod["sku"],
							'grams' => $prod["peso"],
							'weight' => ($prod["peso"]/1000),
							'weight_unit' => "kg",
							'barcode' => $prod["EAN"],
							'inventory_quantity'=> $prod["stock"],
							'inventory_management' => 'shopify',
							'inventory_policy' => 'continue',
							'taxable' => true,
							'requires_shipping' => true
						)
					)
				));
//				foreach($para_shopify["product"] as $k => $v){
//					$para_shopify["product"][$k] = iconv("UTF-8", "ISO-8859-2", $v);
//				}
				$url = "https://$key:$password@$shop.myshopify.com/admin/";
				$headers = get_headers($url, 1);
				$apiLimit = (int) str_replace('/500', '', $headers['HTTP_X_SHOPIFY_SHOP_API_CALL_LIMIT']);
				// since Shopify returns the API limit as x/500 I remove the /500 and convert the call value to integer.  Now you can use this to identify how many calls you have left.
				$url = "https://$key:$password@$shop.myshopify.com/admin/products.json";
				echo "<p>Es " . $url . "</p>";
				$json_shopify = json_encode($para_shopify, JSON_UNESCAPED_UNICODE); //  // , JSON_FORCE_OBJECT
//				print_r($para_shopify);
				$curl = null;
				$curl = curl_init();
				curl_setopt($curl, CURLOPT_URL, $url);
				curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json; charset=utf-8'));
				curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); //specify return value as string
				curl_setopt($curl, CURLOPT_VERBOSE, 0);
				curl_setopt($curl, CURLOPT_HEADER, 1);
				curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");  //specify this as a POST
				curl_setopt($curl, CURLOPT_POSTFIELDS, $json_shopify);
				curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
				$response = curl_exec ($curl);
				curl_close ($curl);
				echo "<pre>";
				print_r($response); 
				echo "</pre>";
endwhile;
}

The process runs but only send and publish the first product to Shopify.

Hope you understand.

 

EASDK - forgoing the app "homepage"? by jackRacer

$
0
0

I am using the Embedded SDK to create a menu item on the Orders page.  

Is there anyway to forgo the app "homepage" I am required to create?  It would really be redundant to Shopify's Order page...

 

Thanks!

Diego Lerma commented on [PHP] Problems on massive upload products using WordPress and cURL

$
0
0

Guys!

I solved it!

The problem was me on the array $my_query->posts[0] 

Have to ve $my_query->posts[$i]

Jason commented on Display products based on a date

$
0
0

Custom Fields from other platform are generally best mapped to Metafields. Metafields are added via the API (or bulk editor) so you can't add them via the csv import.

What I'm more curious about is the plan for the date picker and how that determines what products to show. Is this to be used on a prodct page that loads up extra products? A collection page with certain filter? Curious...

How can you bind an order to a shop when order webhooks don't contain shop info? by TS

$
0
0

I'm working on an application that utilizes webhooks to receive orders. I have a single "reciever" method that every webhook is addressed to. The order_creation response contains no information about what shop/merchant that the order belongs to... is that a major design flaw or am I missing something?

When my application receives an order, it has no idea who it belongs to. If I have shop A and shop B... I assign them a unique identifier based on the shop domain prefix (myshop.shopify, etc). 

Is there a way to identify the merchant from order webhook response? Or is the only way to give every webhook a unique address on creation?

 

Thanks

Don commented on Display products based on a date

$
0
0

The date picker displays products on the home page. It's a moon phase calendar and the date determines what moon phase appeared on specific date. Current site is opencart based and I want to move it to shopify, http://yourmoonphase.com.


Saurabh Jain commented on Fetch 4 digit order id

Individual Product possible with Shopify? by grevo

$
0
0

I need to make a custom product configurator. On the product you can choose Material, Color, Size etc.
So the product can theoretically have hundred thousend variants.

My idea is to write the product configurator with jQuery.
I calculate then the price with jQuery, and generate a text-string from the choosen variant.
Then i will add an existing shopify product to the cart, and just change the price and the description-text.

Is this possible?

Thanks for any help

Jason commented on Individual Product possible with Shopify?

$
0
0

It's possible. The complicator is that anything added to the cart has to be a variant - you can't just "create" a price. Line Item Properties can be useful when you want to add details to a product, but not something that changes price (eg: monograms).

There's a 100 variant limit on products so for very complex items you may need to create groups of products and more than one item to the cart per build.

grevo commented on Individual Product possible with Shopify?

$
0
0

Thank you a lot for your precise anser Jason!
Line Item Properties would be what i am looking for. But if i cna't change the price it makes it very complicated.
I could make Product variants in 10c steps so i could cover the Price for 5.00 to 15.00.
But think it is a bit a unprecies solutain, and difficult for the future.

Maybe i should look for a other shop solution for this project.

Jason commented on Individual Product possible with Shopify?

$
0
0

It can get tricky. 

Now if you're comfortable making an app, there's nothing stopping you from developing something that create a custom product on the fly and that product is added to the cart. That's not something that will come up on the forums every often since it requires a lot more development skills but it's an option that you've got.

Take a peek over the API docs and see if that's something you could work with.

Ruairi H commented on Error "Name of Option is not unique" when they actually are unique

$
0
0

Hi,

Ruairi here from Shopify.

I reached out to you by email to ask a few clarifying questions. Once we find the solution I'll post it in here :)

- Ruairi H

Charles Coleman commented on Invalid Email Address - When Creating New Customer Account

$
0
0

Still no solution from shopify as to what is going on here?? Great.. :-(


HMAC don't match with customer create webhook by redochka

$
0
0

Hello,

When receiving the customers/create webhook, I make a hmac verification which it doesn't match. 

However when receiving the orders/create webhook, the hmac check matches.

I am using the same code for both cases.

Why does the customers/create webhook hmac check fail?

thanks

Get orders of product by Thanh Bui Tuan

$
0
0

Hello, I have a problem, that is getting orders which had a specific product but without check list of all orders. Is there any way to get it more easier?

thank for reading !

standoutd commented on Get orders of product

$
0
0

In admin? You can search in the orders list by SKU, then save it as a search. You will then have a tab on top with the name you give the saved search. Click it to see those orders.

Adam commented on Mobile API: Apple Pay Shipping Address Fails

$
0
0

Hi Lohit,

You said need to add shipping address to the checkout.  Was there more code to the line?

updateCheckout:completion:

Thanks,

Adam

 

Adam commented on iOS SDK - Apple Pay Error 500

$
0
0

Hi Lohit,

Spent alot of time on this today.  Looks like the First Name, Last Name, and first line of shipping address are getting replaced with '---' which is the Partial Address Default.  

It looks like billingAddress and shippingAddress in PKPayment were deprecated in iOS 9. Perhaps that's why in + (nonnull BUYAddress *)buy_addressFromContact:(nullable PKContact*)contact

it isn't filling in the address fields correctly.  Any thoughts would be appreciated

 

Adam

Viewing all 25503 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>