basklee-nuxt 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -34
- package/package.json +2 -2
- package/src/project-readme.mjs +26 -25
- package/templates/app/components/basklee/account/AccountActivity.README.md +2 -2
- package/templates/app/components/basklee/account/AccountPromocodes.README.md +2 -2
- package/templates/app/components/basklee/account/AccountSection.README.md +2 -2
- package/templates/app/components/basklee/account/SignInHistory.README.md +2 -2
- package/templates/app/components/basklee/account/StorefrontLogout.README.md +2 -2
- package/templates/app/components/basklee/account/StorefrontProfile.README.md +10 -10
- package/templates/app/components/basklee/address/AddressForm.README.md +2 -2
- package/templates/app/components/basklee/address/StorefrontAddresses.README.md +2 -2
- package/templates/app/components/basklee/blog/BlogArticle.README.md +2 -2
- package/templates/app/components/basklee/blog/BlogCommentForm.README.md +2 -2
- package/templates/app/components/basklee/blog/BlogComments.README.md +2 -2
- package/templates/app/components/basklee/blog/StorefrontJournal.README.md +2 -2
- package/templates/app/components/basklee/cart/CartCheckoutDetails.README.md +2 -2
- package/templates/app/components/basklee/cart/CartDeliverySelector.README.md +3 -3
- package/templates/app/components/basklee/cart/CartItemOptions.README.md +3 -3
- package/templates/app/components/basklee/cart/CartLineItem.README.md +3 -3
- package/templates/app/components/basklee/cart/CartPreview.README.md +2 -2
- package/templates/app/components/basklee/cart/DeliveryMap.README.md +2 -2
- package/templates/app/components/basklee/cart/StorefrontCart.README.md +2 -2
- package/templates/app/components/basklee/catalog/StorefrontCatalog.README.md +2 -2
- package/templates/app/components/basklee/categories/StorefrontCategory.README.md +2 -2
- package/templates/app/components/basklee/contact/AboutPage.README.md +2 -2
- package/templates/app/components/basklee/contact/ContactForm.README.md +2 -2
- package/templates/app/components/basklee/contact/EmailUnsubscribe.README.md +2 -2
- package/templates/app/components/basklee/contact/StorefrontContact.README.md +2 -2
- package/templates/app/components/basklee/events/EventEnrollmentDialog.README.md +2 -2
- package/templates/app/components/basklee/legal/CookieNotice.README.md +2 -2
- package/templates/app/components/basklee/legal/StorefrontPrivacy.README.md +2 -2
- package/templates/app/components/basklee/manufacturers/ManufacturerIndex.README.md +2 -2
- package/templates/app/components/basklee/manufacturers/StorefrontManufacturers.README.md +2 -2
- package/templates/app/components/basklee/orders/OrderDetails.README.md +2 -2
- package/templates/app/components/basklee/orders/OrderPaymentForm.README.md +3 -3
- package/templates/app/components/basklee/orders/StorefrontOrders.README.md +2 -2
- package/templates/app/components/basklee/payments/PaymentPanel.README.md +3 -3
- package/templates/app/components/basklee/products/ProductCard.README.md +2 -2
- package/templates/app/components/basklee/products/ProductCardActions.README.md +2 -2
- package/templates/app/components/basklee/products/ProductPreorderDialog.README.md +2 -2
- package/templates/app/components/basklee/products/ProductReviewForm.README.md +2 -2
- package/templates/app/components/basklee/products/ProductReviewGallery.README.md +2 -2
- package/templates/app/components/basklee/products/ProductReviewImageViewer.README.md +2 -2
- package/templates/app/components/basklee/products/ProductReviews.README.md +2 -2
- package/templates/app/components/basklee/products/ProductSpecificationsDialog.README.md +2 -2
- package/templates/app/components/basklee/products/StorefrontProduct.README.md +2 -2
- package/templates/app/components/basklee/products/StorefrontWishlist.README.md +2 -2
- package/templates/app/components/basklee/promo/PromoProducts.README.md +2 -2
- package/templates/app/components/basklee/search/ProductSearchResults.README.md +2 -2
- package/templates/app/components/basklee/search/SearchFilters.vue +9 -0
- package/templates/app/components/basklee/sellers/SellerFilters.README.md +2 -2
- package/templates/app/components/basklee/sellers/SellerPhotoGallery.README.md +2 -2
- package/templates/app/components/basklee/sellers/SellerSummary.README.md +2 -2
- package/templates/app/components/basklee/sellers/StorefrontSellers.README.md +2 -2
- package/templates/app/components/basklee/shared/BaskleeAvatar.README.md +2 -2
- package/templates/app/components/basklee/shared/BaskleeBreadcrumbs.README.md +2 -2
- package/templates/app/components/basklee/shared/BaskleeEmptyState.README.md +2 -2
- package/templates/app/components/basklee/shared/BaskleeInfoHint.README.md +2 -2
- package/templates/app/components/basklee/shared/BaskleePasswordInput.README.md +2 -2
- package/templates/app/components/basklee/shared/BaskleeSearchSelect.README.md +2 -2
- package/templates/app/components/basklee/shared/BaskleeSelect.README.md +2 -2
- package/templates/app/components/basklee/shared/StorefrontErrorPage.README.md +2 -2
- package/templates/app/components/basklee/shared/StorefrontPagination.README.md +2 -2
- package/templates/app/components/basklee/storefront/StorefrontAccount.README.md +1 -1
- package/templates/app/components/basklee/storefront/StorefrontFooter.README.md +4 -4
- package/templates/app/components/basklee/storefront/StorefrontHome.README.md +5 -5
- package/templates/app/components/basklee/stores/StorefrontStores.README.md +2 -2
- package/templates/app/components/basklee/subscriptions/StorefrontSubscriptions.README.md +3 -3
- package/templates/app/components/basklee/subscriptions/StorefrontTariff.README.md +2 -2
- package/templates/app/components/basklee/subscriptions/StorefrontTariffs.README.md +2 -2
- package/templates/app/components/basklee/subscriptions/SubscriptionCancelDialog.README.md +4 -4
- package/templates/app/components/basklee/subscriptions/SubscriptionChangeDialog.README.md +5 -5
- package/templates/app/components/basklee/subscriptions/SubscriptionExtendDialog.README.md +4 -4
- package/templates/app/components/basklee/subscriptions/SubscriptionPlanSummary.README.md +5 -5
- package/templates/app/components/basklee/subscriptions/SubscriptionRemoteDetails.README.md +5 -5
- package/templates/app/components/basklee/subscriptions/SubscriptionRenewalDialog.README.md +5 -5
- package/templates/app/components/basklee/support/StorefrontSupport.README.md +2 -2
- package/templates/app/components/basklee/support/TicketConversation.README.md +2 -2
- package/templates/app/components/basklee/support/TicketImage.README.md +2 -2
- package/templates/app/components/basklee/support/TicketItemCard.README.md +2 -2
- package/templates/app/components/basklee/support/TicketMessageForm.README.md +2 -2
- package/templates/app/components/basklee/support/TicketSubscriptionCard.README.md +2 -2
- package/templates/app/components/basklee/tariffs/TariffCard.README.md +2 -2
- package/templates/app/components/basklee/tariffs/TariffCardDescription.README.md +2 -2
- package/templates/app/components/basklee/tariffs/TariffCardFeatures.README.md +2 -2
- package/templates/app/components/basklee/tariffs/TariffCardImage.README.md +2 -2
- package/templates/app/components/basklee/tariffs/TariffCardPrices.README.md +2 -2
- package/templates/app/components/basklee/tariffs/TariffCardTitle.README.md +2 -2
- package/templates/app/components/basklee/tariffs/TariffCards.README.md +2 -2
- package/templates/app/components/basklee/tariffs/TariffSubscriptionModal.README.md +2 -2
- package/templates/app/components/basklee/wallet/StorefrontWallet.README.md +3 -3
- package/templates/app/components/basklee/wallet/WalletTopUpForm.README.md +2 -2
- package/templates/app/interfaces/basklee/products/IProductSearchApi.ts +2 -0
- package/templates/app/interfaces/basklee/products/IProductSearchFacets.ts +2 -0
- package/templates/app/pages/product/[id].vue +6 -0
- package/templates/app/utils/basklee/browseLabels.ts +3 -0
- package/templates/app/utils/basklee/productStructuredData.ts +18 -4
- package/templates/basklee/COMPONENTS.md +58 -58
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Footer · Nuxt
|
|
2
2
|
|
|
3
|
-
The [footer guide](https://basklee.com/en/sandbox/components/nuxt/footer)
|
|
4
|
-
([Russian](https://basklee.com/ru/sandbox/components/nuxt/footer)) documents
|
|
3
|
+
The [footer guide](https://docs.basklee.com/en/sandbox/components/nuxt/footer)
|
|
4
|
+
([Russian](https://docs.basklee.com/ru/sandbox/components/nuxt/footer)) documents
|
|
5
5
|
`StorefrontFooter.vue`, used by the default layout. It displays Application Load
|
|
6
6
|
logos, the first six public root categories, available home product sections,
|
|
7
7
|
profile/journal links, a contact-page link, social links and company copyright.
|
|
@@ -10,10 +10,10 @@ section anchor; the Featured link opens `/featured` instead of a home anchor.
|
|
|
10
10
|
The host router handles ordinary clicks; modified clicks and
|
|
11
11
|
external social links keep browser behavior. `year` defaults to the current year.
|
|
12
12
|
|
|
13
|
-
The footer uses the physical [social links](https://basklee.com/en/sandbox/components/nuxt/footer-social).
|
|
13
|
+
The footer uses the physical [social links](https://docs.basklee.com/en/sandbox/components/nuxt/footer-social).
|
|
14
14
|
Their guide shows the component inside the actual footer. Unsupported social
|
|
15
15
|
URLs are omitted. Company details and the message form appear on the separate
|
|
16
|
-
[contact page](https://basklee.com/en/sandbox/components/nuxt/contact-page).
|
|
16
|
+
[contact page](https://docs.basklee.com/en/sandbox/components/nuxt/contact-page).
|
|
17
17
|
|
|
18
18
|
When Application Load reports `init.visual_settings.single_seller_mode: true`, StorefrontFooter hides the Sellers link. The generated storefront redirects direct `/sellers` visits to the catalog while preserving the locale.
|
|
19
19
|
|
|
@@ -29,7 +29,7 @@ If AppLoad has no new products, the generated home page uses
|
|
|
29
29
|
`store.setHomeNewProducts(products, sellers)` stores the confirmed products and IDs.
|
|
30
30
|
A failed request can be retried explicitly. AppLoad refresh/reset clears the
|
|
31
31
|
supplemental IDs and cancels stale results. The home component itself does not
|
|
32
|
-
request products. The [Home guide](https://basklee.com/en/sandbox/components/nuxt/home#groups)
|
|
32
|
+
request products. The [Home guide](https://docs.basklee.com/en/sandbox/components/nuxt/home#groups)
|
|
33
33
|
documents the rules and lets readers edit existing products in its preview.
|
|
34
34
|
|
|
35
35
|
`productLimit` defaults to 12 per section. More reveals the rest of the
|
|
@@ -64,10 +64,10 @@ slot receives `section`, `productIds`, `collection`, `disabled` and the current
|
|
|
64
64
|
`limit`; preserve `productIds` to retain each section’s grouping. The other slots
|
|
65
65
|
receive no props. Slots render only when their section has data. Replacement
|
|
66
66
|
content owns its event bindings. Source and child guides are under
|
|
67
|
-
[Storefront home](https://basklee.com/en/sandbox/components/nuxt/home),
|
|
68
|
-
[Categories](https://basklee.com/en/sandbox/components/nuxt/categories),
|
|
69
|
-
[Banners](https://basklee.com/en/sandbox/components/nuxt/banners) and
|
|
70
|
-
[Events](https://basklee.com/en/sandbox/components/nuxt/events), with matching
|
|
67
|
+
[Storefront home](https://docs.basklee.com/en/sandbox/components/nuxt/home),
|
|
68
|
+
[Categories](https://docs.basklee.com/en/sandbox/components/nuxt/categories),
|
|
69
|
+
[Banners](https://docs.basklee.com/en/sandbox/components/nuxt/banners) and
|
|
70
|
+
[Events](https://docs.basklee.com/en/sandbox/components/nuxt/events), with matching
|
|
71
71
|
Russian routes. They show the physical components in their parent with dashed
|
|
72
72
|
highlights and link back to Application Load.
|
|
73
73
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Store addresses, map, phone numbers, opening hours and products.
|
|
4
4
|
|
|
5
5
|
The supplied storefront uses this component at `/stores`.
|
|
6
|
-
[English guide](https://basklee.com/en/sandbox/components/nuxt/stores) ·
|
|
7
|
-
[Russian guide](https://basklee.com/ru/sandbox/components/nuxt/stores)
|
|
6
|
+
[English guide](https://docs.basklee.com/en/sandbox/components/nuxt/stores) ·
|
|
7
|
+
[Russian guide](https://docs.basklee.com/ru/sandbox/components/nuxt/stores)
|
|
8
8
|
|
|
9
9
|
## Contract and dependencies
|
|
10
10
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Subscription dates, plan, automatic renewal, renewal payment and support.
|
|
4
4
|
|
|
5
5
|
The supplied storefront uses this component at `/subscriptions`.
|
|
6
|
-
[English guide](https://basklee.com/en/sandbox/components/nuxt/subscriptions) ·
|
|
7
|
-
[Russian guide](https://basklee.com/ru/sandbox/components/nuxt/subscriptions)
|
|
6
|
+
[English guide](https://docs.basklee.com/en/sandbox/components/nuxt/subscriptions) ·
|
|
7
|
+
[Russian guide](https://docs.basklee.com/ru/sandbox/components/nuxt/subscriptions)
|
|
8
8
|
|
|
9
9
|
## Contract and dependencies
|
|
10
10
|
|
|
@@ -148,4 +148,4 @@ The following tables describe the response and the supplied composition’s foll
|
|
|
148
148
|
| Отмена продления | Подписка активна, `cancelled_date` отсутствует, у тарифа есть периоды или уже настроено продление. |
|
|
149
149
|
| После подтверждённого изменения | Загрузите `subscriptions_get` и `profile_get`: используйте полученные тариф, даты, продление, признак ожидания и баланс. Если обновление не удалось, повторите его до следующего действия с оплатой. |
|
|
150
150
|
|
|
151
|
-
[English guide](https://basklee.com/en/sandbox/components/nuxt/subscriptions) · [Русский](https://basklee.com/ru/sandbox/components/nuxt/subscriptions)
|
|
151
|
+
[English guide](https://docs.basklee.com/en/sandbox/components/nuxt/subscriptions) · [Русский](https://docs.basklee.com/ru/sandbox/components/nuxt/subscriptions)
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
One public subscription plan with its media, description, purchase choices and confirmation.
|
|
4
4
|
|
|
5
5
|
The supplied storefront uses this component at `/tariffs/:slug/:id`.
|
|
6
|
-
[English guide](https://basklee.com/en/sandbox/components/nuxt/tariff-details) ·
|
|
7
|
-
[Russian guide](https://basklee.com/ru/sandbox/components/nuxt/tariff-details)
|
|
6
|
+
[English guide](https://docs.basklee.com/en/sandbox/components/nuxt/tariff-details) ·
|
|
7
|
+
[Russian guide](https://docs.basklee.com/ru/sandbox/components/nuxt/tariff-details)
|
|
8
8
|
|
|
9
9
|
## Contract and dependencies
|
|
10
10
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Plans grouped by subscription, with search, sign-in for guests and subscription purchase.
|
|
4
4
|
|
|
5
5
|
The supplied storefront uses this component at `/tariffs`.
|
|
6
|
-
[English guide](https://basklee.com/en/sandbox/components/nuxt/subscription-plans) ·
|
|
7
|
-
[Russian guide](https://basklee.com/ru/sandbox/components/nuxt/subscription-plans)
|
|
6
|
+
[English guide](https://docs.basklee.com/en/sandbox/components/nuxt/subscription-plans) ·
|
|
7
|
+
[Russian guide](https://docs.basklee.com/ru/sandbox/components/nuxt/subscription-plans)
|
|
8
8
|
|
|
9
9
|
## Contract and dependencies
|
|
10
10
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Subscription cancellation · Nuxt
|
|
2
2
|
|
|
3
|
-
The [subscription cancellation dialog](https://basklee.com/en/sandbox/components/nuxt/subscription-cancel)
|
|
3
|
+
The [subscription cancellation dialog](https://docs.basklee.com/en/sandbox/components/nuxt/subscription-cancel)
|
|
4
4
|
is `app/components/basklee/subscriptions/SubscriptionCancelDialog.vue`,
|
|
5
5
|
nested under My subscriptions in Components. The subscriptions page opens it
|
|
6
6
|
for the `Cancel subscription` action of one subscription.
|
|
@@ -34,6 +34,6 @@ place and keeps the focused control.
|
|
|
34
34
|
|
|
35
35
|
## Related components
|
|
36
36
|
|
|
37
|
-
[My subscriptions](https://basklee.com/en/sandbox/components/nuxt/subscriptions),
|
|
38
|
-
[Plan and option change](https://basklee.com/en/sandbox/components/nuxt/subscription-change),
|
|
39
|
-
[Automatic renewal](https://basklee.com/en/sandbox/components/nuxt/subscription-renewal).
|
|
37
|
+
[My subscriptions](https://docs.basklee.com/en/sandbox/components/nuxt/subscriptions),
|
|
38
|
+
[Plan and option change](https://docs.basklee.com/en/sandbox/components/nuxt/subscription-change),
|
|
39
|
+
[Automatic renewal](https://docs.basklee.com/en/sandbox/components/nuxt/subscription-renewal).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Plan and option change · Nuxt
|
|
2
2
|
|
|
3
|
-
The [plan change dialog](https://basklee.com/en/sandbox/components/nuxt/subscription-change)
|
|
3
|
+
The [plan change dialog](https://docs.basklee.com/en/sandbox/components/nuxt/subscription-change)
|
|
4
4
|
is `app/components/basklee/subscriptions/SubscriptionChangeDialog.vue`,
|
|
5
5
|
nested under My subscriptions in Components. The subscriptions page opens it
|
|
6
6
|
for the `Change plan` action of one subscription. The `option` mode is kept,
|
|
@@ -79,7 +79,7 @@ is open switches it in place and keeps the entered values and the focused field.
|
|
|
79
79
|
|
|
80
80
|
## Related components
|
|
81
81
|
|
|
82
|
-
[My subscriptions](https://basklee.com/en/sandbox/components/nuxt/subscriptions),
|
|
83
|
-
[Subscription cancellation](https://basklee.com/en/sandbox/components/nuxt/subscription-cancel),
|
|
84
|
-
[Renewal payment](https://basklee.com/en/sandbox/components/nuxt/subscription-extend),
|
|
85
|
-
[Automatic renewal](https://basklee.com/en/sandbox/components/nuxt/subscription-renewal).
|
|
82
|
+
[My subscriptions](https://docs.basklee.com/en/sandbox/components/nuxt/subscriptions),
|
|
83
|
+
[Subscription cancellation](https://docs.basklee.com/en/sandbox/components/nuxt/subscription-cancel),
|
|
84
|
+
[Renewal payment](https://docs.basklee.com/en/sandbox/components/nuxt/subscription-extend),
|
|
85
|
+
[Automatic renewal](https://docs.basklee.com/en/sandbox/components/nuxt/subscription-renewal).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Subscription renewal payment · Nuxt
|
|
2
2
|
|
|
3
|
-
The [subscription renewal payment dialog](https://basklee.com/en/sandbox/components/nuxt/subscription-extend)
|
|
3
|
+
The [subscription renewal payment dialog](https://docs.basklee.com/en/sandbox/components/nuxt/subscription-extend)
|
|
4
4
|
is `app/components/basklee/subscriptions/SubscriptionExtendDialog.vue`, nested
|
|
5
5
|
under My subscriptions in Components. The subscriptions page opens it for the
|
|
6
6
|
`Extend now` action of one subscription.
|
|
@@ -48,6 +48,6 @@ keeps the entered values and the focused field.
|
|
|
48
48
|
|
|
49
49
|
## Related components
|
|
50
50
|
|
|
51
|
-
[My subscriptions](https://basklee.com/en/sandbox/components/nuxt/subscriptions),
|
|
52
|
-
[Automatic renewal](https://basklee.com/en/sandbox/components/nuxt/subscription-extendal),
|
|
53
|
-
[Subscription plans](https://basklee.com/en/sandbox/components/nuxt/subscription-plans).
|
|
51
|
+
[My subscriptions](https://docs.basklee.com/en/sandbox/components/nuxt/subscriptions),
|
|
52
|
+
[Automatic renewal](https://docs.basklee.com/en/sandbox/components/nuxt/subscription-extendal),
|
|
53
|
+
[Subscription plans](https://docs.basklee.com/en/sandbox/components/nuxt/subscription-plans).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Plan and usage · Nuxt
|
|
2
2
|
|
|
3
|
-
The [plan and usage summary](https://basklee.com/en/sandbox/components/nuxt/subscription-plan)
|
|
3
|
+
The [plan and usage summary](https://docs.basklee.com/en/sandbox/components/nuxt/subscription-plan)
|
|
4
4
|
is `app/components/basklee/subscriptions/SubscriptionPlanSummary.vue`,
|
|
5
5
|
nested under My subscriptions in Components. The subscriptions page renders
|
|
6
6
|
one on each subscription card, and the extend dialog shows the same summary
|
|
@@ -41,9 +41,9 @@ plan has no picture, description or parameters and no usage was reported.
|
|
|
41
41
|
|
|
42
42
|
## Related components
|
|
43
43
|
|
|
44
|
-
[My subscriptions](https://basklee.com/en/sandbox/components/nuxt/subscriptions),
|
|
45
|
-
[Subscription service details](https://basklee.com/en/sandbox/components/nuxt/subscription-remote),
|
|
46
|
-
[Subscription extension](https://basklee.com/en/sandbox/components/nuxt/subscription-extend).
|
|
44
|
+
[My subscriptions](https://docs.basklee.com/en/sandbox/components/nuxt/subscriptions),
|
|
45
|
+
[Subscription service details](https://docs.basklee.com/en/sandbox/components/nuxt/subscription-remote),
|
|
46
|
+
[Subscription extension](https://docs.basklee.com/en/sandbox/components/nuxt/subscription-extend).
|
|
47
47
|
## Response fields and application actions
|
|
48
48
|
|
|
49
49
|
The following tables describe the response and the supplied composition’s follow-up actions. The framework-specific props and events above identify which work belongs to the component and which belongs to its parent.
|
|
@@ -98,4 +98,4 @@ The following tables describe the response and the supplied composition’s foll
|
|
|
98
98
|
| `sales_module`, `blog_module`, `qr_module` | Логические признаки модулей продаж, блога и QR-маркировки остатков. Справочник встроенных параметров находится в `subscriptions_guest_search`. |
|
|
99
99
|
| Параметр уже показан рядом с использованием | Его предел исключается из отдельного списка параметров тарифа, чтобы выводиться один раз. |
|
|
100
100
|
|
|
101
|
-
[English guide](https://basklee.com/en/sandbox/components/nuxt/subscription-plan) · [Русский](https://basklee.com/ru/sandbox/components/nuxt/subscription-plan)
|
|
101
|
+
[English guide](https://docs.basklee.com/en/sandbox/components/nuxt/subscription-plan) · [Русский](https://docs.basklee.com/ru/sandbox/components/nuxt/subscription-plan)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Subscription service details · Nuxt
|
|
2
2
|
|
|
3
|
-
The [subscription service details](https://basklee.com/en/sandbox/components/nuxt/subscription-remote)
|
|
3
|
+
The [subscription service details](https://docs.basklee.com/en/sandbox/components/nuxt/subscription-remote)
|
|
4
4
|
are `app/components/basklee/subscriptions/SubscriptionRemoteDetails.vue`,
|
|
5
5
|
nested under My subscriptions in Components. The subscriptions page renders
|
|
6
6
|
one for each subscription and the block appears only for a subscription that a
|
|
@@ -72,9 +72,9 @@ for the same restraint.
|
|
|
72
72
|
|
|
73
73
|
## Related components
|
|
74
74
|
|
|
75
|
-
[My subscriptions](https://basklee.com/en/sandbox/components/nuxt/subscriptions),
|
|
76
|
-
[Plan and usage](https://basklee.com/en/sandbox/components/nuxt/subscription-plan),
|
|
77
|
-
[Plan and option change](https://basklee.com/en/sandbox/components/nuxt/subscription-change).
|
|
75
|
+
[My subscriptions](https://docs.basklee.com/en/sandbox/components/nuxt/subscriptions),
|
|
76
|
+
[Plan and usage](https://docs.basklee.com/en/sandbox/components/nuxt/subscription-plan),
|
|
77
|
+
[Plan and option change](https://docs.basklee.com/en/sandbox/components/nuxt/subscription-change).
|
|
78
78
|
## Response fields and application actions
|
|
79
79
|
|
|
80
80
|
The following tables describe the response and the supplied composition’s follow-up actions. The framework-specific props and events above identify which work belongs to the component and which belongs to its parent.
|
|
@@ -129,7 +129,7 @@ The following tables describe the response and the supplied composition’s foll
|
|
|
129
129
|
| Пример пакета | `host: shop.example` и `enabled: false` дают две строки. Вложенный объект `settings` по умолчанию не выводится. Явный список fields только с `host` оставляет лишь это сведение. |
|
|
130
130
|
| Собственные сведения | Слот details получает исходные `data` сервиса и отфильтрованные `entries`. Собственный вывод должен выбирать предназначенные для отображения поля. |
|
|
131
131
|
|
|
132
|
-
[English guide](https://basklee.com/en/sandbox/components/nuxt/subscription-remote) · [Русский](https://basklee.com/ru/sandbox/components/nuxt/subscription-remote)
|
|
132
|
+
[English guide](https://docs.basklee.com/en/sandbox/components/nuxt/subscription-remote) · [Русский](https://docs.basklee.com/ru/sandbox/components/nuxt/subscription-remote)
|
|
133
133
|
|
|
134
134
|
## Initial service setup / Первичная настройка сервиса
|
|
135
135
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Automatic renewal · Nuxt
|
|
2
2
|
|
|
3
|
-
The [automatic renewal dialog](https://basklee.com/en/sandbox/components/nuxt/subscription-renewal)
|
|
3
|
+
The [automatic renewal dialog](https://docs.basklee.com/en/sandbox/components/nuxt/subscription-renewal)
|
|
4
4
|
is `app/components/basklee/subscriptions/SubscriptionRenewalDialog.vue`,
|
|
5
5
|
nested under My subscriptions in Components. The subscriptions page opens it
|
|
6
6
|
for the `Automatic renewal` action of one subscription.
|
|
@@ -37,9 +37,9 @@ keeps the entered values and the focused field.
|
|
|
37
37
|
|
|
38
38
|
## Related components
|
|
39
39
|
|
|
40
|
-
[My subscriptions](https://basklee.com/en/sandbox/components/nuxt/subscriptions),
|
|
41
|
-
[Subscription renewal payment](https://basklee.com/en/sandbox/components/nuxt/subscription-extend),
|
|
42
|
-
[Subscription plans](https://basklee.com/en/sandbox/components/nuxt/subscription-plans).
|
|
40
|
+
[My subscriptions](https://docs.basklee.com/en/sandbox/components/nuxt/subscriptions),
|
|
41
|
+
[Subscription renewal payment](https://docs.basklee.com/en/sandbox/components/nuxt/subscription-extend),
|
|
42
|
+
[Subscription plans](https://docs.basklee.com/en/sandbox/components/nuxt/subscription-plans).
|
|
43
43
|
## Response fields and application actions
|
|
44
44
|
|
|
45
45
|
The following tables describe the response and the supplied composition’s follow-up actions. The framework-specific props and events above identify which work belongs to the component and which belongs to its parent.
|
|
@@ -82,4 +82,4 @@ The following tables describe the response and the supplied composition’s foll
|
|
|
82
82
|
| Нет доступного оплаченного периода; средств недостаточно | Настройка продления успешно сохраняется, но период не покупается. Покажите текущую дату окончания и баланс; для оплаты продления покупателю нужно пополнить баланс. |
|
|
83
83
|
| После `submit` | Родитель отправляет запрос и загружает `subscriptions_get` и `profile_get`. `renew_period` подтверждает настройку; `active_until` и признак синхронизации определяют состояние доступа. Успех сам по себе подтверждает сохранение настройки, но не новый оплаченный доступ. |
|
|
84
84
|
|
|
85
|
-
[English guide](https://basklee.com/en/sandbox/components/nuxt/subscription-renewal) · [Русский](https://basklee.com/ru/sandbox/components/nuxt/subscription-renewal)
|
|
85
|
+
[English guide](https://docs.basklee.com/en/sandbox/components/nuxt/subscription-renewal) · [Русский](https://docs.basklee.com/ru/sandbox/components/nuxt/subscription-renewal)
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
User conversations, replies and support for a purchase.
|
|
4
4
|
|
|
5
5
|
The supplied storefront uses this component at `/tickets`.
|
|
6
|
-
[English guide](https://basklee.com/en/sandbox/components/nuxt/support) ·
|
|
7
|
-
[Russian guide](https://basklee.com/ru/sandbox/components/nuxt/support)
|
|
6
|
+
[English guide](https://docs.basklee.com/en/sandbox/components/nuxt/support) ·
|
|
7
|
+
[Russian guide](https://docs.basklee.com/ru/sandbox/components/nuxt/support)
|
|
8
8
|
|
|
9
9
|
## Contract and dependencies
|
|
10
10
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Messages, attachments, conversation closing and support rating.
|
|
4
4
|
|
|
5
5
|
The supplied storefront uses this component at `/tickets`.
|
|
6
|
-
[English guide](https://basklee.com/en/sandbox/components/nuxt/ticket-conversation) ·
|
|
7
|
-
[Russian guide](https://basklee.com/ru/sandbox/components/nuxt/ticket-conversation)
|
|
6
|
+
[English guide](https://docs.basklee.com/en/sandbox/components/nuxt/ticket-conversation) ·
|
|
7
|
+
[Russian guide](https://docs.basklee.com/ru/sandbox/components/nuxt/ticket-conversation)
|
|
8
8
|
|
|
9
9
|
## Contract and dependencies
|
|
10
10
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Loading and viewing an image from the user’s conversation.
|
|
4
4
|
|
|
5
5
|
The supplied storefront uses this component at `/tickets`.
|
|
6
|
-
[English guide](https://basklee.com/en/sandbox/components/nuxt/ticket-image) ·
|
|
7
|
-
[Russian guide](https://basklee.com/ru/sandbox/components/nuxt/ticket-image)
|
|
6
|
+
[English guide](https://docs.basklee.com/en/sandbox/components/nuxt/ticket-image) ·
|
|
7
|
+
[Russian guide](https://docs.basklee.com/ru/sandbox/components/nuxt/ticket-image)
|
|
8
8
|
|
|
9
9
|
## Contract and dependencies
|
|
10
10
|
|
|
@@ -4,8 +4,8 @@ The purchased item a support conversation is about: picture, name and the
|
|
|
4
4
|
detail that identifies it.
|
|
5
5
|
|
|
6
6
|
The supplied storefront uses this component at `/tickets`.
|
|
7
|
-
[English guide](https://basklee.com/en/sandbox/components/nuxt/ticket-item-card) ·
|
|
8
|
-
[Russian guide](https://basklee.com/ru/sandbox/components/nuxt/ticket-item-card)
|
|
7
|
+
[English guide](https://docs.basklee.com/en/sandbox/components/nuxt/ticket-item-card) ·
|
|
8
|
+
[Russian guide](https://docs.basklee.com/ru/sandbox/components/nuxt/ticket-item-card)
|
|
9
9
|
|
|
10
10
|
## Contract and dependencies
|
|
11
11
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Message text and images for a new conversation or reply.
|
|
4
4
|
|
|
5
5
|
The supplied storefront uses this component at `/tickets`.
|
|
6
|
-
[English guide](https://basklee.com/en/sandbox/components/nuxt/ticket-message-form) ·
|
|
7
|
-
[Russian guide](https://basklee.com/ru/sandbox/components/nuxt/ticket-message-form)
|
|
6
|
+
[English guide](https://docs.basklee.com/en/sandbox/components/nuxt/ticket-message-form) ·
|
|
7
|
+
[Russian guide](https://docs.basklee.com/ru/sandbox/components/nuxt/ticket-message-form)
|
|
8
8
|
|
|
9
9
|
## Contract and dependencies
|
|
10
10
|
|
|
@@ -4,8 +4,8 @@ The subscription a support conversation is about: plan, number, state,
|
|
|
4
4
|
paid-until date and automatic renewal.
|
|
5
5
|
|
|
6
6
|
The supplied storefront uses this component at `/tickets`.
|
|
7
|
-
[English guide](https://basklee.com/en/sandbox/components/nuxt/ticket-subscription-card) ·
|
|
8
|
-
[Russian guide](https://basklee.com/ru/sandbox/components/nuxt/ticket-subscription-card)
|
|
7
|
+
[English guide](https://docs.basklee.com/en/sandbox/components/nuxt/ticket-subscription-card) ·
|
|
8
|
+
[Russian guide](https://docs.basklee.com/ru/sandbox/components/nuxt/ticket-subscription-card)
|
|
9
9
|
|
|
10
10
|
## Contract and dependencies
|
|
11
11
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
A plan card with its image, trial badge, name, description, explained plan modules and limits, the option chooser of a plan that offers more than one option, period prices and subscribe actions.
|
|
4
4
|
|
|
5
|
-
[English guide](https://basklee.com/en/sandbox/components/nuxt/tariff-card) ·
|
|
6
|
-
[Russian guide](https://basklee.com/ru/sandbox/components/nuxt/tariff-card)
|
|
5
|
+
[English guide](https://docs.basklee.com/en/sandbox/components/nuxt/tariff-card) ·
|
|
6
|
+
[Russian guide](https://docs.basklee.com/ru/sandbox/components/nuxt/tariff-card)
|
|
7
7
|
|
|
8
8
|
The guide describes the physical component's inputs, events and data sources.
|
|
9
9
|
The source bundle includes its imported components, TypeScript declarations,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
The short plan description without HTML tags, and the full description under Details.
|
|
4
4
|
|
|
5
|
-
[English guide](https://basklee.com/en/sandbox/components/nuxt/tariff-description) ·
|
|
6
|
-
[Russian guide](https://basklee.com/ru/sandbox/components/nuxt/tariff-description)
|
|
5
|
+
[English guide](https://docs.basklee.com/en/sandbox/components/nuxt/tariff-description) ·
|
|
6
|
+
[Russian guide](https://docs.basklee.com/ru/sandbox/components/nuxt/tariff-description)
|
|
7
7
|
|
|
8
8
|
The guide describes the physical component's inputs, events and data sources.
|
|
9
9
|
The source bundle includes its imported components, TypeScript declarations,
|
|
@@ -4,8 +4,8 @@ The modules and limits of a plan from `tariff_variables_json`, each with the
|
|
|
4
4
|
explanation of its information control, and the chooser of the plan's options,
|
|
5
5
|
shown only when the plan offers more than one.
|
|
6
6
|
|
|
7
|
-
[English guide](https://basklee.com/en/sandbox/components/nuxt/tariff-features) ·
|
|
8
|
-
[Russian guide](https://basklee.com/ru/sandbox/components/nuxt/tariff-features)
|
|
7
|
+
[English guide](https://docs.basklee.com/en/sandbox/components/nuxt/tariff-features) ·
|
|
8
|
+
[Russian guide](https://docs.basklee.com/ru/sandbox/components/nuxt/tariff-features)
|
|
9
9
|
|
|
10
10
|
The guide describes the physical component's inputs, events and data sources.
|
|
11
11
|
The source bundle includes its imported components, TypeScript declarations,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
The first small plan image. A plan without an image shows no picture: beside cards that have one it leaves that row of the card empty, and in a single column the row takes no space.
|
|
4
4
|
|
|
5
|
-
[English guide](https://basklee.com/en/sandbox/components/nuxt/tariff-image) ·
|
|
6
|
-
[Russian guide](https://basklee.com/ru/sandbox/components/nuxt/tariff-image)
|
|
5
|
+
[English guide](https://docs.basklee.com/en/sandbox/components/nuxt/tariff-image) ·
|
|
6
|
+
[Russian guide](https://docs.basklee.com/ru/sandbox/components/nuxt/tariff-image)
|
|
7
7
|
|
|
8
8
|
The guide describes the physical component's inputs, events and data sources.
|
|
9
9
|
The source bundle includes its imported components, TypeScript declarations,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
The period switcher, the price for the chosen period and the Subscribe and Try actions. A plan that only the store administrator assigns, or a plan that no longer accepts new subscriptions, shows a note instead of actions. The plan and its parent subscription each carry `is_new_subs_allowed` and `only_admin_can_subscribe`, and both have to allow the purchase. A signed-in customer who already had the plan's subscription sees no Try action and no trial badge: the backend gives a trial once per subscription. The plan pages load the customer's records with `subscriptions_get`; until they arrive, the trial stays shown.
|
|
4
4
|
|
|
5
|
-
[English guide](https://basklee.com/en/sandbox/components/nuxt/tariff-prices) ·
|
|
6
|
-
[Russian guide](https://basklee.com/ru/sandbox/components/nuxt/tariff-prices)
|
|
5
|
+
[English guide](https://docs.basklee.com/en/sandbox/components/nuxt/tariff-prices) ·
|
|
6
|
+
[Russian guide](https://docs.basklee.com/ru/sandbox/components/nuxt/tariff-prices)
|
|
7
7
|
|
|
8
8
|
The guide describes the physical component's inputs, events and data sources.
|
|
9
9
|
The source bundle includes its imported components, TypeScript declarations,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
The tariff name in its card, in the selected language.
|
|
4
4
|
|
|
5
|
-
[English guide](https://basklee.com/en/sandbox/components/nuxt/tariff-title) ·
|
|
6
|
-
[Russian guide](https://basklee.com/ru/sandbox/components/nuxt/tariff-title)
|
|
5
|
+
[English guide](https://docs.basklee.com/en/sandbox/components/nuxt/tariff-title) ·
|
|
6
|
+
[Russian guide](https://docs.basklee.com/ru/sandbox/components/nuxt/tariff-title)
|
|
7
7
|
|
|
8
8
|
The guide describes the physical component's inputs, events and data sources.
|
|
9
9
|
The source bundle includes its imported components, TypeScript declarations,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Plan cards in a responsive grid. Every card fills the same rows of that grid, so the name, the price, the option chooser and the actions of the cards in one row start at the same height and the cards end together. `subscriptionId` keeps the plans of one subscription, and a non-empty `tariffIds` keeps only the listed plan IDs.
|
|
4
4
|
|
|
5
|
-
[English guide](https://basklee.com/en/sandbox/components/nuxt/tariff-cards) ·
|
|
6
|
-
[Russian guide](https://basklee.com/ru/sandbox/components/nuxt/tariff-cards)
|
|
5
|
+
[English guide](https://docs.basklee.com/en/sandbox/components/nuxt/tariff-cards) ·
|
|
6
|
+
[Russian guide](https://docs.basklee.com/ru/sandbox/components/nuxt/tariff-cards)
|
|
7
7
|
|
|
8
8
|
The guide describes the physical component's inputs, events and data sources.
|
|
9
9
|
The source bundle includes its imported components, TypeScript declarations,
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Select an option, enter a promotion code and confirm a subscription purchase.
|
|
4
4
|
|
|
5
5
|
The supplied storefront uses this component at `/tariffs`.
|
|
6
|
-
[English guide](https://basklee.com/en/sandbox/components/nuxt/tariff-subscription-modal) ·
|
|
7
|
-
[Russian guide](https://basklee.com/ru/sandbox/components/nuxt/tariff-subscription-modal)
|
|
6
|
+
[English guide](https://docs.basklee.com/en/sandbox/components/nuxt/tariff-subscription-modal) ·
|
|
7
|
+
[Russian guide](https://docs.basklee.com/ru/sandbox/components/nuxt/tariff-subscription-modal)
|
|
8
8
|
|
|
9
9
|
## Contract and dependencies
|
|
10
10
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Payment history, balance top-ups and cancellation of unpaid invoices.
|
|
4
4
|
|
|
5
5
|
The supplied storefront uses this component at `/wallet`.
|
|
6
|
-
[English guide](https://basklee.com/en/sandbox/components/nuxt/wallet) ·
|
|
7
|
-
[Russian guide](https://basklee.com/ru/sandbox/components/nuxt/wallet)
|
|
6
|
+
[English guide](https://docs.basklee.com/en/sandbox/components/nuxt/wallet) ·
|
|
7
|
+
[Russian guide](https://docs.basklee.com/ru/sandbox/components/nuxt/wallet)
|
|
8
8
|
|
|
9
9
|
## Contract and dependencies
|
|
10
10
|
|
|
@@ -114,4 +114,4 @@ The following tables describe the response and the supplied composition’s foll
|
|
|
114
114
|
| `refunds[].status.int` | Позиция возврата описывает операцию возврата. Завершение подтверждает только `EInvoiceStatus.COMPLETED`; `to_balance` указывает возврат на баланс или исходный способ оплаты. |
|
|
115
115
|
| Проверка состояния или закрытие | Готовый кошелёк загружает `invoices_get` и `profile_get`, затем берёт баланс из `wallet` текущего профиля. Оплату подтверждает полученное состояние; открытие или закрытие `PaymentPanel` само по себе её не подтверждает. |
|
|
116
116
|
|
|
117
|
-
[English guide](https://basklee.com/en/sandbox/components/nuxt/wallet) · [Русский](https://basklee.com/ru/sandbox/components/nuxt/wallet)
|
|
117
|
+
[English guide](https://docs.basklee.com/en/sandbox/components/nuxt/wallet) · [Русский](https://docs.basklee.com/ru/sandbox/components/nuxt/wallet)
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Amount, currency and payment-method selection for a wallet top-up.
|
|
4
4
|
|
|
5
5
|
The supplied storefront uses this component at `/wallet`.
|
|
6
|
-
[English guide](https://basklee.com/en/sandbox/components/nuxt/wallet-top-up) ·
|
|
7
|
-
[Russian guide](https://basklee.com/ru/sandbox/components/nuxt/wallet-top-up)
|
|
6
|
+
[English guide](https://docs.basklee.com/en/sandbox/components/nuxt/wallet-top-up) ·
|
|
7
|
+
[Russian guide](https://docs.basklee.com/ru/sandbox/components/nuxt/wallet-top-up)
|
|
8
8
|
|
|
9
9
|
## Contract and dependencies
|
|
10
10
|
|
|
@@ -33,6 +33,7 @@ export interface IProductSearchFilters {
|
|
|
33
33
|
only_featured?: boolean;
|
|
34
34
|
only_new?: boolean;
|
|
35
35
|
with_discount?: boolean;
|
|
36
|
+
only_in_stock?: boolean;
|
|
36
37
|
is_good_for_promo?: number;
|
|
37
38
|
price_currency?: number;
|
|
38
39
|
price_from?: number;
|
|
@@ -110,6 +111,7 @@ export interface IProductSearchChoices {
|
|
|
110
111
|
any: number;
|
|
111
112
|
};
|
|
112
113
|
raiting_above_45: number;
|
|
114
|
+
out_of_stock: number;
|
|
113
115
|
}
|
|
114
116
|
|
|
115
117
|
export interface IProductSearchResponse {
|
|
@@ -12,6 +12,8 @@ export interface IProductSearchFacets {
|
|
|
12
12
|
};
|
|
13
13
|
discounts?: { any: number };
|
|
14
14
|
raiting_above_45?: number;
|
|
15
|
+
// Listed products that cannot be bought now; the in-stock filter hides them.
|
|
16
|
+
out_of_stock?: number;
|
|
15
17
|
manufacture?: { id: number; name: string; count: number }[];
|
|
16
18
|
};
|
|
17
19
|
variants?: Record<
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import { useBaskleeServerData } from '@/composables/useBaskleeServerData';
|
|
8
8
|
import { requestProductPage } from '@/utils/basklee/productPage';
|
|
9
9
|
import { storefrontAbsoluteUrl } from '@/utils/basklee/pageSeo';
|
|
10
|
+
import { productAvailability } from '@/utils/basklee/productAvailability';
|
|
10
11
|
import {
|
|
11
12
|
shippingCountryCodes,
|
|
12
13
|
storefrontProductStructuredData,
|
|
@@ -111,6 +112,11 @@
|
|
|
111
112
|
store.init?.shipping_countries,
|
|
112
113
|
),
|
|
113
114
|
showSeller: !store.init?.visual_settings?.single_seller_mode,
|
|
115
|
+
// A preorder offered instead of «Add to cart» is PreOrder, not OutOfStock.
|
|
116
|
+
preorder: productAvailability(
|
|
117
|
+
product.value,
|
|
118
|
+
store.init?.variables?.allow_preorder,
|
|
119
|
+
).canPreorder,
|
|
114
120
|
absoluteUrl: (value) => storefrontAbsoluteUrl(value, origin),
|
|
115
121
|
}),
|
|
116
122
|
});
|
|
@@ -9,6 +9,7 @@ export function browseLabels(locale: string) {
|
|
|
9
9
|
applyPrice: 'Применить',
|
|
10
10
|
moreFilters: 'Дополнительно',
|
|
11
11
|
discountFrom: 'Скидка от, %',
|
|
12
|
+
inStock: 'Только в наличии',
|
|
12
13
|
ratedProducts: 'Товары с оценкой от 4,5',
|
|
13
14
|
ratedSellers: 'Продавцы с оценкой от 4,5',
|
|
14
15
|
withReviews: 'Только с отзывами',
|
|
@@ -56,6 +57,7 @@ export function browseLabels(locale: string) {
|
|
|
56
57
|
applyPrice: 'Aplicar',
|
|
57
58
|
moreFilters: 'Más filtros',
|
|
58
59
|
discountFrom: 'Descuento mínimo, %',
|
|
60
|
+
inStock: 'Solo en stock',
|
|
59
61
|
ratedProducts: 'Productos con valoración de 4,5 o más',
|
|
60
62
|
ratedSellers: 'Vendedores con valoración de 4,5 o más',
|
|
61
63
|
withReviews: 'Solo con reseñas',
|
|
@@ -103,6 +105,7 @@ export function browseLabels(locale: string) {
|
|
|
103
105
|
applyPrice: 'Apply',
|
|
104
106
|
moreFilters: 'More filters',
|
|
105
107
|
discountFrom: 'Minimum discount, %',
|
|
108
|
+
inStock: 'In stock only',
|
|
106
109
|
ratedProducts: 'Products rated 4.5 and above',
|
|
107
110
|
ratedSellers: 'Sellers rated 4.5 and above',
|
|
108
111
|
withReviews: 'With reviews only',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// The product page's schema.org data for search engines: Google merchant
|
|
2
2
|
// listings and Yandex product snippets read the same block. Every value
|
|
3
3
|
// repeats what the page shows: the price and the crossed-out old price,
|
|
4
|
-
// stock, return terms, photos, brand, seller and rating. The
|
|
5
|
-
// left out: it depends on the buyer's address.
|
|
4
|
+
// stock (or a preorder), return terms, photos, brand, seller and rating. The
|
|
5
|
+
// delivery cost is left out: it depends on the buyer's address.
|
|
6
6
|
// The same file is in the three packages; it has no imports so that it stays
|
|
7
7
|
// identical.
|
|
8
8
|
|
|
@@ -49,6 +49,12 @@ export interface StorefrontProductDataOptions {
|
|
|
49
49
|
shippingCountries: string[];
|
|
50
50
|
/** False when the page hides the seller (single-seller storefront). */
|
|
51
51
|
showSeller: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* True when the page offers a preorder instead of «Add to cart»
|
|
54
|
+
* (productAvailability().canPreorder): the offer is PreOrder, not OutOfStock.
|
|
55
|
+
* Yandex hides the price of an out-of-stock offer.
|
|
56
|
+
*/
|
|
57
|
+
preorder?: boolean;
|
|
52
58
|
/** Makes an image address complete (storefrontAbsoluteUrl). */
|
|
53
59
|
absoluteUrl: (value: string | undefined) => string | undefined;
|
|
54
60
|
}
|
|
@@ -158,8 +164,16 @@ export function storefrontProductStructuredData(
|
|
|
158
164
|
ON_SALE_STATUSES.includes(product.status?.status) &&
|
|
159
165
|
product.c_real_left > 0;
|
|
160
166
|
const returns = productReturnPolicy(product, options.shippingCountries);
|
|
161
|
-
|
|
167
|
+
// Yandex requires a brand: without a manufacturer the seller (in a
|
|
168
|
+
// single-seller storefront, the shop itself) made the product.
|
|
169
|
+
const brand =
|
|
170
|
+
product.manufacture?.name?.trim() || product.seller?.name?.trim();
|
|
162
171
|
const seller = options.showSeller ? product.seller?.name?.trim() : '';
|
|
172
|
+
const availability = inStock
|
|
173
|
+
? 'InStock'
|
|
174
|
+
: options.preorder
|
|
175
|
+
? 'PreOrder'
|
|
176
|
+
: 'OutOfStock';
|
|
163
177
|
const reviews = Number(product.feedback_stat?.c_feedbacks ?? 0);
|
|
164
178
|
const rating = Number(product.feedback_stat?.avg_raiting ?? 0);
|
|
165
179
|
const offer =
|
|
@@ -180,7 +194,7 @@ export function storefrontProductStructuredData(
|
|
|
180
194
|
},
|
|
181
195
|
}
|
|
182
196
|
: {}),
|
|
183
|
-
'availability': `${SCHEMA_ORG}${
|
|
197
|
+
'availability': `${SCHEMA_ORG}${availability}`,
|
|
184
198
|
'itemCondition': `${SCHEMA_ORG}NewCondition`,
|
|
185
199
|
...(returns ? { hasMerchantReturnPolicy: returns } : {}),
|
|
186
200
|
...(seller
|