Loading...
Loading...
Compare original and translation side by side
undefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedshopify app init
cd my-appshopify.app.toml[access_scopes]
scopes = "read_products,write_products,read_orders"shopify app dev # Starts local server with tunnelshopify app generate extension --type checkout_ui_extensionshopify app deploy # Builds and uploads to Shopifyshopify app init
cd my-appshopify.app.toml[access_scopes]
scopes = "read_products,write_products,read_orders"shopify app dev # Starts local server with tunnelshopify app generate extension --type checkout_ui_extensionshopify app deploy # Builds and uploads to Shopifycheckout_ui_extensionadmin_actionadmin_blockpos_ui_extensionfunctionshopify app generate extensioncheckout_ui_extensionadmin_actionadmin_blockpos_ui_extensionfunctionshopify app generate extensionundefinedundefinedshopify theme initshopify theme init
**Local Development:**
```bash
shopify theme dev
**本地开发:**
```bash
shopify theme dev
**Deployment:**
```bash
shopify theme push --development # Push to dev theme
shopify theme publish --theme=123 # Set as live
**部署:**
```bash
shopify theme push --development # Push to dev theme
shopify theme publish --theme=123 # Set as livequery GetProducts($first: Int!) {
products(first: $first) {
edges {
node {
id
title
handle
variants(first: 5) {
edges {
node {
id
price
inventoryQuantity
}
}
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}query GetProducts($first: Int!) {
products(first: $first) {
edges {
node {
id
title
handle
variants(first: 5) {
edges {
node {
id
price
inventoryQuantity
}
}
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}import { reactExtension, BlockStack, TextField, Checkbox } from '@shopify/ui-extensions-react/checkout';
export default reactExtension('purchase.checkout.block.render', () => <Extension />);
function Extension() {
const [message, setMessage] = useState('');
return (
<BlockStack>
<TextField label="Gift Message" value={message} onChange={setMessage} />
</BlockStack>
);
}import { reactExtension, BlockStack, TextField, Checkbox } from '@shopify/ui-extensions-react/checkout';
export default reactExtension('purchase.checkout.block.render', () => <Extension />);
function Extension() {
const [message, setMessage] = useState('');
return (
<BlockStack>
<TextField label="Gift Message" value={message} onChange={setMessage} />
</BlockStack>
);
}{% for product in collection.products %}
<div class="product-card">
<img src="{{ product.featured_image | img_url: 'medium' }}" alt="{{ product.title }}">
<h3>{{ product.title }}</h3>
<p>{{ product.price | money }}</p>
<a href="{{ product.url }}">View Details</a>
</div>
{% endfor %}{% for product in collection.products %}
<div class="product-card">
<img src="{{ product.featured_image | img_url: 'medium' }}" alt="{{ product.title }}">
<h3>{{ product.title }}</h3>
<p>{{ product.price | money }}</p>
<a href="{{ product.url }}">View Details</a>
</div>
{% endfor %}python scripts/shopify_init.pypython scripts/shopify_init.pyX-Shopify-Shop-Api-Call-LimitX-Shopify-Shop-Api-Call-Limit