Jump to content

seb.luke

Members
  • Posts

    4
  • Joined

  • Last visited

Profile Information

  • First Name
    Sebastian
  • Last Name
    Luke

Recent Profile Visitors

83 profile views

seb.luke's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hello, Yes, I found a solution and have posted it on StackOverflow as an answer to my question. You can see the answer here. Please upvote it if it helps you, so it can get to the top of the page
  2. Hello, I want to make a shop in PS that is focused on motorcycle parts. Everything in my shop will come from a third party website and will be imported through the WebService. What I want to know is how to adapt the data to PrestaShop's structure. The information I have is structured in the following way: There are bike parts organized in categories (windshields, stands, exhausts etc) - normal PS organized data We will have a structure of Make - Model - Year and each bike part will be assigned to several Make - Model - Year combinations We will need an AJAX filter for the Make - Model - Year that will then show the above-mentioned categories that contain ONLY products that are assigned to those make-model-year bikes. There is a PS module that has a some-what same functionality (Advanced Product Search Bar with 3 Filters Module) but does not allow me to import the make-model-year automatically by using the WebService. My question is there a way to have this kind on structure in the PrestaShop Core? (this way I will be able to import data using the PS WS), or do I need to write my own module for that. If so, what kind on structure do you recommend and HOW can I integrate that module into the WebService (which is the critical part of this website)? For example, in Wordpress I'd use categories for the parts categories (e.g. exhausts etc.) and tags (make-model-year concatenated tags) for the filter. From the drop-down I'd concatenate the make-model-year and show only products having that specific tag. Thank you for your insight!
  3. So, as I am specifying in the title, I am using Prestashop Web Service to add products to my shop. Everything is easy and beautiful with it. I managed to easily add new products to the shop with combinations, categories etc. The problem arises when adding images. PS's documentation shows how to send images to the API so they will link with the product. For example, if I have a product with ID 150, then using CURL with POST to send an image to /api/images/products/150 will add that image to the product (see here). My issue is as follows: when I create a new product using the PS Web Service API, it returns me the XML containing info about the new product. Let's say that my product ID is 151. When going to /api/images/products the last entry there is 150. So basically adding a new product doesn't add a new entry in the images/products section of the API, so I have nowhere to send the image via CURL. I couldn't find a solution on the internet until now. Does anyone know how to force the webservice to create a /images/products entry with the new product id, or how can I manually create an entry? Any help is appreciated. If further details are needed, please write in the comments and I will add them. Also if I write the error output of curl to a file, it looks like this: * Hostname was found in DNS cache * Trying IP... * Connected to domain.com (IP) port 80 (#0) * Server auth using Basic with user 'KEY' * Connection #0 to host domain.com left intact which is not useful for debugging. If for example I add an image manually to the newly created product, I can use my code with no issue whatsoever... Any help is much appreciated! Thank you. PS: I am using PS v1.6
×
×
  • Create New...