Closed Garfius closed 5 years ago
Hi @Garfius, it would be great if you could make a pull request over README.md documenting this.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
I have seen your nice project, and compiled (some tiny modifications needed)
The idea is to use prestaSharp on powerShell scripts, and IT WORKS !!
Load the compiled binaries:
Add-Type -Path .\RestSharp.dll Add-Type -Path .\Bukimedia.PrestaSharp.dll
Set the url and key to variables
$key = "AKEYIDONTREMEMBERBLABLABLABLABLA"
$url = "http://www.myAwesomeWeb.com/api"
Test some commands
$b = New-Object Bukimedia.PrestaSharp.Factories.StockAvailableFactory($url,$key,"") $b.GetAll() $b.Get(12)
Create a typed object to upload, i copied the one from Get(12) with MODIFIED QUANTITY
_$c = New-Object Bukimedia.PrestaSharp.Entities.stock_available $c.id = 12 $c.id_product = 15501 $c.id_shop = 1 $c.quantity = 123 $c.id_product_attribute =0 $c.id_shopgroup =0
Post to prestashop
$b.Update($c) $b.GetAll()
And everything works perfect!!
SOOOOOO
Can anyone create a powershell tutorial 'cause scripting matters !!
Thanks, great job!