I have produced an ASP.NET/MVC Web application where a user uploads a file, I then take that file and generate a new file based on server-side calculations. This new file is saved server-side.
I then need to post this new file to my client's Shopify URL via a Submit button (the end user will see this file and can then select 'Add to Cart').
I've been doing some looking around (e.g. 'post file to Shopify URL?') and the search results returned relate to either uploading files to your Shopify account through the Shopify admin console, or, a Shopify form post to external URL - this is not what I want - I need to post to Shopify from an external URL.
Is it possible to post a file to a Shopify URL? and if so, presumably this could be done using JSON? Can I use the Shopify API to do this? Presumably I'd need Shopify username / password credentials from the client to do this?
As you can tell(!) I'm a newbie to Shopify development so please forgive the seemingly straight-forward questions, but some guidance would be greatly appreciated, Thanks
You should be using Shopify to upload the file. In product.liquid you can do this, and the file is saved along with the order as a product's line item property. When the order is booked, you can listen for that event, then use API calls to get the order and the image the customer uploaded. At that point you manipulate the image or file as you wish.
You cannot POST a file to Shopify in the sense of making a product that then goes in the cart. What you could do is POST to your server, use the API to generate a new product with that file as part of the new product, then show that new product off to the customer. A lot of work in that pattern for sure!
Anyway, your question in the context of Shopify and how it works is too difficult to answer here with much more detail, especially without you saying what it is you are trying to actually do.
Related
I change the details with the new information.
Here is the situation: Our customers have Wordpress sites, they can customize it as they wish with the theme of their choice. Our customers were originally on another CMS with some features provided by an external webservice. My question at the beginning was, can we use an external webservice with Wordpress? The answer is yes, I know it. I even discovered through other forums and research the wp_remote functions. (request, post, get)
I made a Wordpress plugin, in order to have a solution whatever the theme chosen by the user. It is a search widget that will communicate with a specific function of the external webservice to receive the information that the client wants.
My question is now this: Once my plugin has communicated with my external webservice and retrieved the necessary information from the client. What do you advise me to do to integrate this data into the site? (To have a correct display on a page)
At first, I used the wp_insert_post function to add my search content as a post to the site. The display was fine, which is what I wanted, but the method of getting this result.... is confusing to me.
Thanks for your answers.
I have created a website with https://wordpress.com ,
I want to add a file upload button so that people could upload the files and as soon as they upload the file I want it to be uploaded on my site as well, and they must enter the authentication password before uploading. I am using the free plan of WordPress and hence can't install plugins.
In case more information needed please feel free to ask.
The closest you can get to this on free Wordpress.com is embedding a Jotform form - that form allows uploading an attachment.
https://wordpress.com/support/forms/jotform/
It won’t automatically upload to the media library. But if you enable the Post by Email feature on your site and use the PBE email address for your Jotform notification email, that can then automatically create a new post on your site from the form submission.
I’m not sure to what extent you’ll be able to customize the Jotform email with the PBE parameters to control the created post’s formatting and settings, but it’s an option you can look into.
https://wordpress.com/support/post-by-email/
You may have seen WP plugins that allow guests to submit posts. Those submissions proceed to the WP posts area where the admin can edit/publish them.
I want to create a form like this that I can install on my (and other people's) computers, so they can fill out the form fields for a WP post, save offline, then send to my WP site when ready.
Can anyone tell me the steps involved, and, if there is a description for what type of thing this is, please let me know to aid my search.
I am learning code at present and want to learn while building tools.
Thanks
Hi hope I can give you some hints with this answer.
I don't know what programming language you would like to use, but for the communication with your Wordpress blog you could use the WP API to create a post over REST API. It offers a API to create and edit your Wordpress Posts over HTTP.
Your programm just have to check if an connection is possible and then execute the API calls.
You could use an database to store all created post and then call the Create Post Task with the POST Method over HTTP for each post saved offline.
When the creation was successful you could update your offline database, so that the post is marked as already created.
I have recently updated a plain html website for a music festival into wordpress. All is fine and beautifulllllll(!), except for one thing. People who apply for the courses are supposed to pay for a deposit, and when they do so they should receive a confirmation email that includes a URL for the future payment of the rest of the course fee.
With the old site, we used to have something like:
http://www.mysite.com/coursefee.php?amount=10&refno=1234&name=John
The coursefee.php file used the $_GET method to create a form that would lead to the payment service (with the right amount to be paid, the correct reference number, ASO). The problem is that if I use the same configuration in wordpress.... well, things don't work. Wordpress uses url parameters as query parameters and I really don't know how to go around this issue.
Any ideas?
Thanks!!!!!
Did you check the path to your coursefee.php files is in the wordpress root directory ?
This php file is not part of Wordpress core, so if you have the standard .htaccess file, you should access it directly without initializing WordPress.
I am currently in the process of making a WordPress Plugin which is going to parse some external data (products) from various web services and present them as normal pages in WordPress.
I would like to avoid actually creating the pages programatically and instead just generate them on the fly to avoid any synchronization issues if a product is deleted and so forth.
My plugin is going to have a base url in which it will hook on to, for example /products/,
and then I would generate each product page by calling /products/some-product-name/.
I also anticipate the need for uri's like /products/category/some-category-name/ which I will use to list all items in that category.
Since I am new to WordPress plugin development, I am looking for some tips and advice to get me started on the right foot. Any help is highly appreciated ;)
I suppose it really depends on where/how you're getting your info from these web services, but I can imagine that the easiest way would be to setup a page as a controller and have it parse out some RSS or XML to build these "virtual pages" by request, so that you're not storing anything in the DB and if the info requested doesn't exist than yes 404 it.
I solved this by adding a filter to rewrite_rules_array and an action catching template_redirect.