Code Monkey home page Code Monkey logo

Comments (8)

sjcallender avatar sjcallender commented on June 25, 2024

Hi @aeu - See the detailed instructions here on how you can do this by creating more than one "store" endpoint.
#19 (comment)

from shipstation-connect.

aeu avatar aeu commented on June 25, 2024

Hi @sjcallender - that looks like its exactly what we need. I'll give it a shot and hopefully you'll never hear from me again. 😄

from shipstation-connect.

aeu avatar aeu commented on June 25, 2024

Hello - I did these steps and now am getting 401 for user authorization (this was not happening before). Is there a way to test this (via curl for example) so I can isolate the problem to my end vs. the shipstation interface?

from shipstation-connect.

sjcallender avatar sjcallender commented on June 25, 2024

For curl, can you try following this other comment? #36 (comment)

from shipstation-connect.

aeu avatar aeu commented on June 25, 2024

Hi, curl worked great.

This is what I am have in my admin:
00-order-fields

01-order

02-shipping-info-field

03-store-type-field

My curl:

curl \ --request GET 'https://not.the.real.site.com/actions/shipstationconnect/orders/process?store=standard&action=export' \ --header 'Authorization: Basic not the real info='

And the response:
{"error":"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_storeType' in 'where clause'\nThe SQL being executed was: SELECT COUNT(*)\nFROM (SELECTelements.idASelementsId, elements_sites.idASelementsSitesId, content.idAScontentId\nFROM elements elements\nINNER JOIN commerce_orders commerce_ordersONcommerce_orders.id=elements.id\nLEFT JOIN commerce_addresses billing_addressONbilling_address.id=commerce_orders.billingAddressId\nLEFT JOIN commerce_addresses shipping_addressONshipping_address.id=commerce_orders.shippingAddressId\nINNER JOIN elements_sites elements_sitesONelements_sites.elementId=elements.id\nINNER JOIN content contentONcontent.elementId=elements.id\nWHERE (commerce_orders.isCompleted=TRUE) AND (field_storeType='standard') AND (elements.archived=FALSE) AND (elements.dateDeleted IS NULL) AND (elements.draftId IS NULL) AND (elements.revisionIdIS NULL))subquery\nINNER JOIN commerce_orders commerce_ordersONcommerce_orders.id=subquery.elementsId\nLEFT JOIN commerce_addresses billing_addressONbilling_address.id=commerce_orders.billingAddressId\nLEFT JOIN commerce_addresses shipping_addressONshipping_address.id=commerce_orders.shippingAddressId\nINNER JOIN elements elementsONelements.id=subquery.elementsId\nINNER JOIN elements_sites elements_sitesONelements_sites.id=subquery.elementsSitesId\nINNER JOIN content contentONcontent.id=subquery.contentId"}

from shipstation-connect.

sjcallender avatar sjcallender commented on June 25, 2024

@johnnynotsolucky - Can you take a look at this tomorrow?

from shipstation-connect.

aeu avatar aeu commented on June 25, 2024

FYI

MariaDB [myDatabaseName]> show columns from content;
+-------------------------------------+---------------+------+-----+---------+----------------+
| Field                               | Type          | Null | Key | Default | Extra          |
+-------------------------------------+---------------+------+-----+---------+----------------+
| id                                  | int(11)       | NO   | PRI | NULL    | auto_increment |
| elementId                           | int(11)       | NO   | MUL | NULL    |                |
| siteId                              | int(11)       | NO   | MUL | NULL    |                |
| title                               | varchar(255)  | YES  | MUL | NULL    |                |
| dateCreated                         | datetime      | NO   |     | NULL    |                |
| dateUpdated                         | datetime      | NO   |     | NULL    |                |
| uid                                 | char(36)      | NO   |     | 0       |                |
| field_summary                       | text          | YES  |     | NULL    |                |
| field_wholesalePrice                | decimal(12,2) | YES  |     | NULL    |                |
| field_subtitle                      | text          | YES  |     | NULL    |                |
| field_productDescription            | text          | YES  |     | NULL    |                |
| field_shortTitle                    | text          | YES  |     | NULL    |                |
| field_titleSegmentOne               | text          | YES  |     | NULL    |                |
| field_titleSegmentTwo               | text          | YES  |     | NULL    |                |
| field_featuredVideo                 | text          | YES  |     | NULL    |                |
| field_contentBlock1_zbffhfye        | text          | YES  |     | NULL    |                |
| field_contentBlock2_cmajwvhx        | text          | YES  |     | NULL    |                |
| field_contentBlock3_uyecsfae        | text          | YES  |     | NULL    |                |
| field_contentBlock4_oxnjsxqw        | text          | YES  |     | NULL    |                |
| field_contentBlock5_iucermmr        | text          | YES  |     | NULL    |                |
| field_featuredVideoPadding_jkrvxrlv | text          | YES  |     | NULL    |                |
| field_costOfGoods_vgdhhdrq          | decimal(12,2) | YES  |     | NULL    |                |
| field_message_toqblkac              | text          | YES  |     | NULL    |                |
| field_storeType_vvcxynwm            | varchar(255)  | YES  |     | NULL    |                |
| field_anotherStoreType_uazjzkcy     | varchar(255)  | YES  |     | NULL    |                |
+-------------------------------------+---------------+------+-----+---------+----------------+
25 rows in set (0.001 sec)

from shipstation-connect.

johnnynotsolucky avatar johnnynotsolucky commented on June 25, 2024

@aeu thank you for the column listing. The important information is that the field column names now include a suffix for all new fields. See craftcms/cms#6922.

Unfortunately the change mentioned is a breaking change for any code which relies on queries which touch the field columns in the content table. In this case, it's related to OrdersController.php#L137-L140 where we assume the a field is assumed to have the format of "field_{$handle}".

This should be resolved in 1.3.7

from shipstation-connect.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.