markdown Shopify后端探索

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown Shopify后端探索相关的知识,希望对你有一定的参考价值。


storefront_digest - password protection of store
default is null

Can add ?password=<password> to make request under protection

------

_landing_page  - password page?

------

cart_currency - currency of cart

------

secure_customer_sig - logged in customer cookie

------

# Login

form_type - const value \
utf8 - const value \

url: /account/login\
accept-charset="UTF-8" \
method: POST\
params:\
    form_type: customer_login \
    utf8: ✓\
    customer[email]: email \
    customer[password]: password \

On success\
    set cookie to logged in user\
On error\
    response 302\
    message: Invalid login credentials.

------

# Forgot password

url: /account/recover \
accept-charset="UTF-8" \
method: POST \
params: \ 
    form_type: recover_customer_password \
    utf8: ✓\
    email: email \

On error:\
    request 302 Found\
    message: No account found with that email.\

------

# Newsletter

url: /contact#ContactFooter\
accept-charset="UTF-8"\
method: POST\
params:\
    form_type: recover_customer_password \
    utf8: ✓ \
    contact[tags]: newsletter \
    contact[email]: email \

On success: \
    response 302 \
    add query param ?customer_posted=true \

------

# Search

url: /search  
accept-charset="UTF-8" \
method: GET\
params: \
    form_type: recover_customer_password \
    utf8: ✓ \
    q: request \

------

# Add address\

url: /account/addresses\
accept-charset="UTF-8"\
method: POST\
params:\ 
    form_type: customer_address\
    utf8: ✓\
    address[first_name]: first_name\
    address[last_name]: last_name\
    address[company]: company\
    address[address1]: address1\
    address[address2]: address2\
    address[city]: city\
    address[country]: country\
    address[province]: province\
    address[zip]: zip\
    address[phone]: phone\
    address[default]: default default 1
  
------

# EDIT address

url: /account/addresses/*address_id*>\
accept-charset="UTF-8"\
method: PUT\
params:\
    form_type: customer_address\
    utf8: ✓\
    address[first_name]: first_name \
    address[last_name]: last_name \
    address[company]: company \
    address[address1]: address1 \
    address[address2]: address2 \  
    address[city]: city \  
    address[country]: country \  
    address[province]: province \  
    address[zip]: zip \  
    address[phone]: phone \
    address[default]: default - default value 1 \  
    _method: put \

------

# DELETE address

url: /account/addresses/*address_id* \
accept-charset="UTF-8" \
method: DELETE \
params:\
    _method: 'delete'\
  
------

Also in Shopify variable we have method: Shopify.postLink: \
https://gist.github.com/DanWebb/0e32f2dc452aba06adae

Shopify.postLink = function(t, e) {
    e = e || {};
    var n = e.method || "post"
      , i = e.parameters || {}
      , o = document.createElement("form");
    o.setAttribute("method", n),
    o.setAttribute("action", t);
    for (var r in i) {
        var l = document.createElement("input");
        l.setAttribute("type", "hidden"),
        l.setAttribute("name", r),
        l.setAttribute("value", i[r]),
        o.appendChild(l)
    }
    document.body.appendChild(o),
    o.submit(),
    document.body.removeChild(o)
}



App proxy set response by type of response for example request.json

以上是关于markdown Shopify后端探索的主要内容,如果未能解决你的问题,请参考以下文章

markdown 有用的shopify资源

markdown Shopify

markdown [shopify] - 来自Slate的主题

基于.NetCore开发博客项目 StarBlog - (19) Markdown渲染方案探索

为自定义 Shopify 应用存储和检索数据

Shopify - 使用 Shopify API 的新订单 - 如何了解税费和运费?