Skip to content

Commit

Permalink
Update toolkit for Paper v7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
DrJulik committed Jul 9, 2024
1 parent 0ff3f96 commit c071b34
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/prompts/CheckForMatchingTranslations.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Please review this Shopify liquid code and ensure all translation values are pulling from the correct places.

- Within the {% schema %} we want to use translations for the name, label, info and content values. This should look something like this `"t:sections.all.colors.settings.color_border.label"`
- Within the {% schema %} we want to use translations for the name, label, info and content values. This should look something like this `"t:general.settings.color_border.label"`
- All translations should start with `"t:sections.all.` OR `"t:sections.all.[FILE_NAME]`
- [FILE_NAME] is replace with the file name. For example within `content-slider.liquid` the correct translation should start with either `"t:sections.all.` OR `"t:sections.content_slider.`

Expand Down
5 changes: 2 additions & 3 deletions src/prompts/CheckForMissingTranslations.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Please highlight any missing translations in this Shopify liquid code. This file is being used for a Shopify theme. All text that is displayed within the theme should pull from translated values.

- Within the {% schema %} we want to use translations for the name, label, info and content values. This should look something like this `"t:sections.all.colors.settings.color_border.label"`
- Within the code any hardcoded text should be replaced with a translation liquid variable like `{{ 'products.general.options' | t }}`
- Within the {% schema %} we want to use translations for the name, label, info and content values. This should look something like this `"t:general.settings.color_border.label"`
- Within the code any hardcoded text should be replaced with a translation liquid variable like `{{ 'labels.options' | t }}`
- Block and section liquid variables are valid and don't need to be replaced. For example this `{{ block.settings.heading }}` and this `{{ section.settings.heading }}` are both valid

Please share a list of all lines that are not following this standard. You do not need to explain what the lines should be replaced with in your output.

9 changes: 8 additions & 1 deletion src/ts/cart/cart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,14 @@ export const cart = {

// Open cart if set
if (openCart) {

// Hide other overlapping overlays
this.menu_drawer = false;
this.age_popup = false;
this.audio_popup = false;
this.discount_popup = false;
this.filter_popup = false;
this.localization_popup = false;

// Set cart behavior to alert, drawer or redirect
let cart_behavior;
if(window.innerWidth < 768){
Expand Down
4 changes: 4 additions & 0 deletions src/ts/globals/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ export const globals = {
// Product
recent_products: app.recent_products, // {array} of recently viewed products

// Discount properties
discount_text: app.discount_text, // {string} Text for the discount
discount_code: app.discount_code, // {string} Code for the discount

// Cart
cart_alert: app.cart_alert, // {boolean} To show the cart alert
cart_drawer: app.cart_drawer, // {boolean} To toggle the cart drawer
Expand Down
2 changes: 2 additions & 0 deletions src/ts/models.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ export interface AppInterface {
price_enable_zeros: boolean;
price_enable_currency: boolean;
recent_products: any[];
discount_text: string;
discount_code: string;
cart_alert: boolean;
cart_drawer: boolean;
cart_loading: boolean;
Expand Down
3 changes: 3 additions & 0 deletions src/ts/products/products.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,9 @@ export const products = {
(optionsSize === 1 && this.option1) ||
(optionsSize === 2 && this.option1 && this.option2) ||
(optionsSize === 3 && this.option1 && this.option2 && this.option3);
if(this.current_variant_has_only_default_variant === true) {
this.all_options_selected = true;
}
},

// Update order of product gallery images
Expand Down

0 comments on commit c071b34

Please sign in to comment.