Headless shopify, but still use shopify as a cms/page builder for the customer instead of third party cms - content-management-system

I have a customer that wants to do a headless shopify sollution(ill probably go with next js commerce). And with that you will probably miss out on using the theme editor for the customer to manage content on pages(like drag/drop building blocks). Is it still possible to handle this with shopify as a cms while doing headless? or is the only way to make this work to implement a third party cms like Sanity or Shogun.
Hope my question makes sense :)

Not sure about the 3rd party drag and drop builders, but for Shopify pages, blogs and articles, you can use the Shopify API to retrieve the data. You can use Shopify REST API or GraphQL API. Using these, you should be able to get data for
Pages
Blogs
Articles
Comments
Most of the required API responses will include raw html data that you can render via your headless application.

Related

Any code to integrate paypal in ASP.NET Core 6 MVC?

I am developing my first website e-commerce with Visual Studio 2022 and ASP.NET Core 6 MVC. Could someone share with me some code in order to integrate Paypal payments for this version of website?
PS: also, if there is any tutorial that you advise me in order to follow and develop my first e-commerce with ASP.NET Core 6 MVC.
Thanks
Could someone share with me some code in order to integrate Paypal payments for this version of website?
For Paypal integration you should attach it with your order in that
case you can Call the v2/checkout/orders API directly. Here are the URL.
Endpoints For v2 Orders API
Server-side create: https://developer.paypal.com/docs/api/orders/v2/#orders_create
Server-side capture: https://developer.paypal.com/docs/api/orders/v2/#orders_capture
Understand how it works
Here you could have a look how to implement implements on the order page. So that it will be easier for you to understand. You just need to call a few APIs.
Paypal Integration Guides
I would suggest to follow the PayPal Checkout integration guide and make 2 routes on your server, one for the 'Create Order' and one for 'Capture Order' (see the optional step 5 in 'Add and modify the code'). Both of these routes should return only JSON data (no HTML or text). Inside the 2nd route, when the capture API is successful you should store its resulting payment details in your database (particularly purchase_units[0].payments.captures[0].id, which is the PayPal transaction ID) and perform any necessary business logic (such as sending confirmation emails or reserving product) immediately
before forwarding your return JSON to the frontend caller.
Pair those 2 routes with this frontend approval flow: https://developer.paypal.com/demo/checkout/#/pattern/server
.Net server-side SDK
You can get the SDK sample here: https://github.com/paypal/Checkout-NET-SDK
(using this SDK is optional, direct HTTPS API calls first using a clientid+secret to obtain an access token are also possible. In any case, do not use the deprecated PayPal-NET-SDK which is for the old v1/payments API)
Note
While you would be working on implementation, if you encounter any specific issue feel free to post that. That will be more convenient to assist you on this. First, try to implement within your application.
PayPal website says to use Braintree. Here is the link to the tutorial for you: https://developer.paypal.com/braintree/docs/start/hello-server/dotnet

Embedding HTTP response into Confluence without HTML Macro

Context: The HTML Macro is disabled on my company's Confluence.
Use-case: Embed content returned by an internal web-site.
Example: We have a table that lists various sites we have deployed. We have a Confluence page, with a table describing each, and with a URL to each.
Each site also supports a "/ping" that tells us it is live. Is there a way to embed the (simple textual) response from that ping as another column, without the use of HTML Macro?
Stretch goal: If our REST /ping returns Markup/Markdown ...is there a way to get some minimal formatting?
I am working on sth similar as well that calls a public rest api to aggregate some results on a confluence page.
Anyways, I am guessing the html macro is disabled in your company for security reasons. Since you have a specific rest api endpoints, I would suggest that you can create your own custom plugin with a macro. Design it so that the macro can take a param to know which site endpoint to call server side. You can process your requests and let the macro return a string which you can stylize however you want. This is the simplest and cheapest solution (since you won't be paying license fees for a third party addon), and also most secure since you have control over the code.
Is your confluence instance server or cloud? Have you tried asking in the atlassian community forums?
if your company can disable the free alternative then
use the paid alternative : adaptavist scriptrunner
script macro

REST API SERVICE FOR COLLECTING FORM DATA in JAVA

im planning to develop a webapplication using java and HTML implementing as REST Services and confused how ot start with what technologies..
As a First step my first requirement is just creating a login HTML page and create REST SERVICE for LOGIN which validates the user by connecting to Database and generates a session and next page say shopping page.
Please suggest the Java jars,ide, etc to start.
Sorry, your problem is very complex.
To make a website such as shopping page, you can write code with REST services or no need.
If REST Services is used, you must build and setup 2 system/application: web app & server app. (front-end & back-end). With any system/app, you need technologies its own.
To done, you must know many knowledges such as:
API, Rooter, OOP, MVC, how to connect DB,...
There are many IDE such as Eclipse,... or only need a Editor with a few plugin.

Multi-tenant with multi-select template SaaS Web Framework

I'm looking for Frameworks that can help me implement an Application working as Weebly or BigCommerce. This mean customer can register their website, choosing their suitable template and start to operate their website. I've searched on the Internet and the results mention about the Multi-tenant and SaaS architecture; however, I'm not sure whether these keywords are what exactly I want to do or not. If i'm going wrong way please let me know how can I implement an Application like some companies I've mentioned above.Thanks!
There are some requirements:
Customers can edit their Website on the Admin Page
CMS and eCommerece, Billing should be intergrated
One source code which can generate approriate website template for customer.

Make API where other sides can ajax submit to our server

We have a set with campaign sites ala http://safeinthecity.com. We want to make an as generic API as possible where other third party sites can integrate the form (the one in the rectangular on the right side), and the form should be posted with Ajax to our server.
And here the problem arrise - cause of the cross domain restriction the browsers has implemented its not possible. We could make third parties post the form in normal way to our server, but then the user will be redirected from the third party site to our site, and that's not easy to sell in. One solution would be the third parties to add a server script (PHP, Java, .NET, Ruby on Rails, what ever) which they post to, and then the third party server script makes the request through a API equivalent to Apache HTTP client), but that is very very cumbersome and hard to sell in. Is there a smarter way to solve this issue which I haven't spotted yet?
Ok, figured out a way, even thus I dislike the non-support for POST, PUT, DELETE
http://devlog.info/2010/03/10/cross-domain-ajax/