Skip to content

Commit

Permalink
Update from Shopify for theme dawn/lh-combined-listings-bugfixes
Browse files Browse the repository at this point in the history
Committed from shop: combined-listings-test
  • Loading branch information
shopify[bot] authored May 29, 2024
1 parent e49ce52 commit 9bb5890
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions assets/product-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ if (!customElements.get("product-info")) {

this.updateURL(baseUrl, variant?.id);

document.querySelector('head title').innerHTML = html.querySelector('head title').innerHTML
document.querySelector("head title").innerHTML =
html.querySelector("head title").innerHTML;

// If we are in an embedded context (quick add, featured product, etc), only swap product info.
// Otherwise, refresh the entire page content and sibling sections.
Expand Down Expand Up @@ -166,14 +167,14 @@ if (!customElements.get("product-info")) {

!shouldFetchFullPage && params.push(`section_id=${this.sectionId}`);

if (variantId && shouldFetchFullPage) {
params.push(`variant=${variantId}`);
} else {
const optionValues = this.variantSelectors.selectedOptionValues;
if (optionValues.length) {
params.push(`option_values=${optionValues.join(",")}`);
}
// if (variantId && shouldFetchFullPage) {
// params.push(`variant=${variantId}`);
// } else {
const optionValues = this.variantSelectors.selectedOptionValues;
if (optionValues.length) {
params.push(`option_values=${optionValues.join(",")}`);
}
// }

return `${url}?${params.join("&")}`;
}
Expand Down

0 comments on commit 9bb5890

Please sign in to comment.