openlabs / magento Goto Github PK
View Code? Open in Web Editor NEWPython API for Magento
License: Other
Python API for Magento
License: Other
The getCarriers methos should return the list of carriers in form of a dict but it returns a boolean value instead.
I success install this addon and import website,store and store view etc successfully.
But when I start to import catalog, it takes very long time like more then half hour for 300 sku website. It will not import any product if I press F5 to refresh the page while it loading.
I also try it on a websit with 4k sku, and wait until the screen show message to recommend me refresh the page( after hours). after interrupte the importing after hours, I found no product at all in the website.
The addon will not import any product until it load all products from magento? Is there a way to solve this problem?
The package of the release 0.2 miss the README.rst which results in:
Downloading/unpacking magento
Downloading magento-0.2.tar.gz
Running setup.py egg_info for package magento
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/tmp/pip-build/magento/setup.py", line 24, in <module>
long_description=open('README.rst').read(),
IOError: [Errno 2] No such file or directory: 'README.rst'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/tmp/pip-build/magento/setup.py", line 24, in <module>
long_description=open('README.rst').read(),
IOError: [Errno 2] No such file or directory: 'README.rst'
Hello,
We are an ecommerce company , we need to integrate it with Erp Next , how can we do it ?
import magento
url = 'http://mystore.com/'
user = 'user'
password = 'password'
with magento.Order(url, user, password) as order_api:
order_increment_id = '100000001 '
status = 'canceled'
order_api.addcomment(order_increment_id, status)
When i run this code, getting this error:
Traceback (most recent call last):
File "magento_api.py", line 11, in
with magento.Order(url, user, password) as order_api:
File "/usr/local/lib/python2.7/dist-packages/magento-0.3-py2.7.egg/magento/api.py", line 138, in enter
self.username, self.password)
File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in call
return self.__send(self.__name, args)
File "/usr/lib/python2.7/xmlrpclib.py", line 1578, in __request
verbose=self.__verbose
File "/usr/lib/python2.7/xmlrpclib.py", line 1264, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python2.7/xmlrpclib.py", line 1297, in single_request
return self.parse_response(response)
File "/usr/lib/python2.7/xmlrpclib.py", line 1467, in parse_response
p.feed(data)
File "/usr/lib/python2.7/xmlrpclib.py", line 557, in feed
self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: junk after document element: line 2, column 0
Please advise
When I try to connect with our Magento:
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)
Is there a way to ignore certificate errors?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Hello Folks,
We have heard repeatedly that there should be a way to repeatedly use the APIs without initializing the context manager. Hence I have a made a simple implementation and I look forward to your feedback.
The new client api works like:
from magento import Client
# Initialise a client
client = Client('http://yourstore.com', 'api username', 'api password')
# Call the tree method in the catalog_category API
client.catalog_category.tree()
# Get the list of products
client.catalog_product.list()
i get the following errors when trying to install the magento- devlop
C:\Python33\magento-develop>setup.py install
Traceback (most recent call last):
File "C:\Python33\magento-develop\setup.py", line 14, in
execfile(os.path.join('magento', 'version.py'))
NameError: name 'execfile' is not defined
what do i do please??
Hello,
I'm trying to use the magento library inside of an openERP module to reflect updates, and I'm able to take product data before and after a "successful" update, but data in magento is keep the same, and nothing is change. Is product update working?
In this example vals = {'name' : 'new_name'}
print "magento SKU: %s obj: %s" % (product.default_code, magento_biding)
with magento.Product("http://localhost/magento", "openerp_connect", "openerp_connect") as client:
store_view = client.currentStore()
print "Store view: %s" % (store_view)
print "Product before update: %s" % (client.info(product.default_code, attributes=vals.keys(), store_view=store_view))
print "Data to send: %s" % (vals)
print client.call('catalog_product.update', [product.default_code, vals, store_view, 'sku'])
if client.update(product.default_code, vals, store_view=store_view):
print "Update OK"
else:
print "Error updating :("
print "Product after update: %s" % (client.info(product.default_code, attributes=vals.keys(), store_view=store_view))
Hi,
I cant import Sale order or customers, i have just this:
I2015-08-27 14:16:22,359 4191 INFO Autoslide openerp.addons.magentoerpconnect.sale: search for magento saleorders {'created_at': {'to': '2015/08/27 14:15:23', 'from': '2015/08/27 13:47:55'}, 'store_id': {'in': [u'0']}, 'state': {'neq': 'canceled'}} returned []
2015-08-27 14:16:23,834 4191 INFO Autoslide openerp.addons.magentoerpconnect.product: search for magento products {'updated_at': {'to': '2015/08/27 14:15:22', 'from': '2015/08/27 13:47:54'}} returned []
Magento returns nothing for between the dates in the filter.
Regards
This is currently missing. Any plan to migrate magento to Python 3?
$ pip3.4 install magento --user
Downloading/unpacking magento
Using download cache from /home/giampaolo/.pip/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fm%2Fmagento%2Fmagento-0.4.tar.gz
Running setup.py (path:/tmp/pip_build_giampaolo/magento/setup.py) egg_info for package magento
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_giampaolo/magento/setup.py", line 14, in <module>
execfile(os.path.join('magento', 'version.py'))
NameError: name 'execfile' is not defined
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_giampaolo/magento/setup.py", line 14, in <module>
execfile(os.path.join('magento', 'version.py'))
NameError: name 'execfile' is not defined
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_giampaolo/magento
Storing debug log for failure in /home/giampaolo/.pip/pip.log
I've now reinstalled magento_integration on another server - in another location.
It seems that OpenERP only looks for python modules in /usr/lib/pymodules/python2.6/openerp/addons. That's where I've put magento_integration and the required python modules such as magento, pycountry, ...
When I now try to update the module list, I get the following error:
...
File "/usr/lib/pymodules/python2.6/openerp/addons/magento/init.py", line 19, in
from .api import API
ImportError: cannot import name API
What am I doing wrong?
Hi Sharoon,
I am using your magento API CustomerAddress object and found a bug. The list
method returns a list of customers as opposed to a list of addresses.
I made the following change to get it working.
diff --git a/magento/customer.py b/magento/customer.py
index ce5dc90..0e36873 100644
--- a/magento/customer.py
+++ b/magento/customer.py
@@ -107,7 +107,7 @@ class CustomerAddress(API):
:param customer_id: ID of customer whose address needs to be fetched
:return: List of dictionaries of matching records
"""
- return self.call('customer.list', [customer_id])
+ return self.call('customer_address.list', [customer_id])
def create(self, customer_id, data):
"""
Regards,
Jim Karsten
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.