The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.
 
 
Thread Tools Display Modes
  #1  
Old 08-10-2011, 11:54 PM
Stamp Walden's Avatar
Stamp Walden is offline
 
Join Date: Aug 2011
Posts: 14
Default

Unique order numbers for unique products


Is there a way to set unique order numbers for each product. So that the order number for that product increases only when that product is bought. I am trying to set up a system for selling unique codes through ecwid. So far the best idea I have come up with is using egoods and setting each code onto an egood that could be bought. But then I have to figure out how to make it so that when somebody buys that egood, it disappears and all of the other files are still remaining. I also would have to limit the user to download only one of the many uploaded files. A little confusing I know, but please help.
  #2  
Old 08-11-2011, 02:21 PM
Eugene Rimmer's Avatar
Eugene Rimmer Eugene Rimmer is offline
Senior Member
 
Join Date: Jan 2011
Location: Ecwid headquarters
Posts: 7,765
Default

While this is an interesting approach to selling unique egoods, it is quite a laborious way to do that. There is currently no way to have separate order counters per each product. Instead we suggest to use the new APIs of Ecwid to create a custom script that fulfill this task for your shop.

Ecwid version 9.0 came out recently with a big set of great new features. Among them there are 2 APIs that can be used to implement selling unique egoods through Ecwid. For this you need to create a script that will respond to Instant Order Notifications from Ecwid. This script is to be written in server-side language like PHP, Python or Ruby, and then placed on a publicly accessible URL for the notifications from Ecwid to be able to reach it.

This script should do the following:
1) process the order notification coming from Ecwid's ION
2) via the Order API request the details of the order in the notification and see if there are any products ordered that require to issue a unique code or file
3) if there are such products, create (or request from database or some other kind of storage) the unique egoods (codes, files or other types or unique virtual goods)
4) send these details to customer who placed the order via the email.

With such script being configured as an endpoint for the Instant Order Notification system in your Ecwid account, you can create the unique egoods person each purchase in a way, completely transparent for your customers and at the same time flexible enough for the business owner.
The Following User Says Thank You to Eugene Rimmer For This Useful Post:
Michael Martin3 (04-22-2015)
  #3  
Old 09-14-2011, 10:32 PM
Stamp Walden's Avatar
Stamp Walden Stamp Walden is offline
 
Join Date: Aug 2011
Posts: 14
Default PHP API

Is there an example out there anywhere of a PHP script that responds to the ION and asks for the Order API. I have been struggling with this for a while. It seems that server side language is not my forte.
  #4  
Old 09-15-2011, 12:51 AM
Stamp Walden's Avatar
Stamp Walden Stamp Walden is offline
 
Join Date: Aug 2011
Posts: 14
Default

oops above, I have figured out the ION requests. But it is the ORDER API that I am unclear on how to request and receive. Do I need a HTTPS for this?
  #5  
Old 09-15-2011, 11:56 AM
Eugene Rimmer's Avatar
Eugene Rimmer Eugene Rimmer is offline
Senior Member
 
Join Date: Jan 2011
Location: Ecwid headquarters
Posts: 7,765
Default

Quote:
Originally Posted by Stamp Walden View Post
oops above, I have figured out the ION requests. But it is the ORDER API that I am unclear on how to request and receive. Do I need a HTTPS for this?
Here is the PHP example of requesting orders via Ecwid Order API: https://github.com/qetzal/ecwid-api-...hed_orders.php . As you may see, the requests are made to https based addresses only (requests to http addresses will not work). You do not need to have HTTPS / SSL on your site — it's like browsing HTTPS sites from your computer: you can make requests to HTTPS addresses, but you don't need to buy an SSL certificate for your browser.

ION request handling is fairly simple: in your callback script you need to just use $POST variables described here: http://kb.ecwid.com/w/page/43696516/...ons#APIDetails (general information on $POST array is here: http://ru.php.net/manual/en/reserved.variables.post.php , the said variables appear as values of that array).

If you need a professional custom programming service, you can contact our colleagues from Qualiteam, whose 10 year experience in creating custom e-commerce solutions will surely leave you satisfied. Please, email sales@qtmsoft.com with details of your project to get a quote.
The Following User Says Thank You to Eugene Rimmer For This Useful Post:
Michael Martin3 (04-22-2015)
  #6  
Old 09-15-2011, 12:21 PM
Stamp Walden's Avatar
Stamp Walden Stamp Walden is offline
 
Join Date: Aug 2011
Posts: 14
Default PHP follow up

Ok, so a script similar to that one provided. (with a bit of tweaks) would need to be set for the ION url provided? And it would need to be on a HTTPS protocol?

I just want to make sure I have a good understanding of this before I set my server up with a SSL certificate.

Thank You For The Help.
  #7  
Old 09-15-2011, 12:47 PM
Stamp Walden's Avatar
Stamp Walden Stamp Walden is offline
 
Join Date: Aug 2011
Posts: 14
Default

Nevermind I got it working. Now I just have to limit it to the most current order and that should work. Thanks
  #8  
Old 09-15-2011, 01:15 PM
Eugene Rimmer's Avatar
Eugene Rimmer Eugene Rimmer is offline
Senior Member
 
Join Date: Jan 2011
Location: Ecwid headquarters
Posts: 7,765
Default

Quote:
Originally Posted by Stamp Walden View Post
Ok, so a script similar to that one provided. (with a bit of tweaks) would need to be set for the ION url provided? And it would need to be on a HTTPS protocol?

I just want to make sure I have a good understanding of this before I set my server up with a SSL certificate.

Thank You For The Help.
1. That script I linked to is not a typical ION endpoint script - as I noted, it is a working example of Order API, not ION. It can, however, be modified to serve as ION callback according to the ION API documentation here: http://kb.ecwid.com/w/page/43696516/...0Notifications

2. The ION callback script does not need to be placed on HTTPS address - HTTP is quite enough, because ION API is secure itself - no sensitive information is passed.
 
The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:24 AM.
Powered by vBulletin® Version 3.8.11. Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.