-
Notifications
You must be signed in to change notification settings - Fork 613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Catalog 2406 #1195
Catalog 2406 #1195
Conversation
lang/en.json
Outdated
@@ -674,7 +674,9 @@ | |||
"choose_an_option": "Please choose an option", | |||
"select_one": "Please select one", | |||
"description": "Description", | |||
"retail_price": "MSRP", | |||
"retail_price": "MSRP:", | |||
"was": "Was:", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we prefix value with price
like price_was
. Same for now
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
lang/en.json
Outdated
@@ -687,7 +689,8 @@ | |||
"metric": "cm", | |||
"imperial": "in" | |||
}, | |||
"you_save": "(You save {amount})", | |||
"you_save_1": "(You save", | |||
"you_save_2": ")", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should change it to a single variable you_save
like (You save {price})
. And then you can call it as {{lang 'products.you_save' price=price.saved.formatted}}
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That unfortunately does not work, and is causing the bug CATALOG-3121. Which is the main reason for the split
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make that change & show it to me or Michael. I am curious why it does not work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
</span> | ||
<span class="price">{{lang 'products.you_save_2'}}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update this based on the suggestions above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That unfortunately does not work, and is causing the bug CATALOG-3121. Which is the main reason for the split
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, this seems fine because we are dealing with updating the already-rendered view here and so can't pass it to the helper at this point. but let's name these something more descriptive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm wondering - maybe we could simply have something like a you_save = "You save" and then include the parens as part of the html or css so we could have:
<span class="price">{{lang 'products.you_save'}}
<span data-product-price-saved class="price">
{{price.saved.formatted}}
</span>
::before {
content: "(";
}
::after {
content: ")";
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Easiest would be in html just in case css messes up. You would always be 100% sure it works with html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
splitting it in en.json seems the best for now. But we will need to fix the underlining problem of having a dynamic value to be added as a parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add an entry to the changelog and squash the commits into one
"retail_price": "MSRP", | ||
"retail_price": "MSRP:", | ||
"price_was": "Was:", | ||
"price_now": "Now:", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍹 in my opinion we would leave the :
out of the lang file and in the template directly, @junedkazi do you have an opinion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think you could argue the colon is part of the language. we also have it in MSRP: above so i think think it's fine to stay
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you
Autotagging @bigcommerce/storefront-team @davidchin |
0d9fb8d
to
1c94ae9
Compare
I added more code yesterday to fix some UI fixes where ajax response values are not showing up in UI when variant is modified. JZ is testing in an integration store that has the updated theme. |
fe7e115
to
31fbc3a
Compare
This PR is looking good. The only lingering issue I am seeing is that if retail or sale price are not showing at the time of page load then they will not show when choosing variants that have retail and/or sale price values. This is a problem with our current template as well though and I have created a JIRA to document: https://jira.bigcommerce.com/browse/STRF-4701 💚 |
ad180dd
to
13f01be
Compare
…e and non sale price. Also, had to add a hack to fix an existing bug where the price.saved value is not getting updated based on change in variant when price_range flag is turned off. Add changelog for the ticket. Adding the price_ prefix for was and now to implement PR comments.
What?
Adding stencil logic for the rrp strikethrough on PDP and PLP
Tickets / Documentation
https://jira.bigcommerce.com/browse/CATALOG-2406 has the mockups for all the scenarios for products and variants.
Screenshots (if appropriate)
https://jira.bigcommerce.com/browse/CATALOG-2406
Tests
STORE_DOMAIN="https://store-hkyr4dowa1.my-integration.zone" STORE_EMAIL="vandana.premkumar+1522082908@bigcommerce.com" STORE_PASSWORD="db421f1fddd534d3800a" ./functional_phpunit.sh --filter PriceListsStoreFrontPLPUITest --group V3
Starting Functional Tests against specified store:
Cleaning up screenshots...
Domain: https://store-hkyr4dowa1.my-integration.zone
Email: vandana.premkumar+1522082908@bigcommerce.com
Password: db421f1fddd534d3800a
PHP Warning: Module 'pcntl' already loaded in Unknown on line 0
Warning: Module 'pcntl' already loaded in Unknown on line 0
STORE Hash URL: https://store-hkyr4dowa1.my-integration.zone
Build commit id: fea802701841281c261c4c1edcc7547454d0b455
PHPUnit 6.0.8 by Sebastian Bergmann and contributors.
Runtime: PHP 7.0.27 with Xdebug 2.6.0
Configuration: /Users/vandana.premkumar/app/bigcommerce-app-vm/codebases/bigcommerce/tests/Functional/functional.xml
.... 4 / 4 (100%)
Time: 2.69 minutes, Memory: 76.00MB
OK (4 tests, 89 assertions)
STORE_DOMAIN="https://store-hkyr4dowa1.my-integration.zone" STORE_EMAIL="vandana.premkumar+1522082908@bigcommerce.com" STORE_PASSWORD="db421f1fddd534d3800a" ./functional_phpunit.sh --filter PriceListsStoreFrontPDPUITest --group V3
selenium-server-standalone-3.5.0.jar already exists, skipping download
Gecko driver exists, skipping download
Starting Selenium Server with options '-Dwebdriver.gecko.driver=./geckodriver_v0.17.0 -jar ./selenium-server-standalone-3.5.0.jar -enablePassThrough false' in the background
Selenium Server started with PID 87827
To reuse this store for future requests, run:
STORE_DOMAIN="https://store-hkyr4dowa1.my-integration.zone" STORE_EMAIL="vandana.premkumar+1522082908@bigcommerce.com" STORE_PASSWORD="db421f1fddd534d3800a" ./functional_phpunit.sh --filter PriceListsStoreFrontPDPUITest --group V3
Starting Functional Tests against specified store:
Cleaning up screenshots...
Domain: https://store-hkyr4dowa1.my-integration.zone
Email: vandana.premkumar+1522082908@bigcommerce.com
Password: db421f1fddd534d3800a
PHP Warning: Module 'pcntl' already loaded in Unknown on line 0
Warning: Module 'pcntl' already loaded in Unknown on line 0
STORE Hash URL: https://store-hkyr4dowa1.my-integration.zone
Build commit id: fea802701841281c261c4c1edcc7547454d0b455
PHPUnit 6.0.8 by Sebastian Bergmann and contributors.
Runtime: PHP 7.0.27 with Xdebug 2.6.0
Configuration: /Users/vandana.premkumar/app/bigcommerce-app-vm/codebases/bigcommerce/tests/Functional/functional.xml
.......... ..... 15 / 15 (100%)
Time: 14.81 minutes, Memory: 78.00MB
OK (15 tests, 268 assertions)
Functional Tests complete
@bookernath @junedkazi @mjschock