Added products to cart, will not show, as before, in the cart unless I refresh, and it will appear
Thanks you
A Shopify store owner encountered an issue where products added to the cart werenât displaying until the page was manually refreshed.
Initial Problem:
Troubleshooting Steps:
</body> tag in theme.liquidResolution:
The issue was related to PageFlyâs integration with the Shopify theme and required backend adjustments by PageFly support rather than theme code modifications.
Added products to cart, will not show, as before, in the cart unless I refresh, and it will appear
Thanks you
Hi @Alliance,
You can try this code by following these steps:
Step 1: Go to Online Store->Theme->Edit code.
Step 2: Search file theme.liquid,
Step 3: Paste the below code at before element of the file â Save
If it doesnât work, please let me know. Because this matter is related PageFly app you also can chat with our 24/7 live chat to get real-time support and solve it quickly.
Hope my solution works perfectly for you!
Best regards,
Victor | PageFly
Hi victor,
I canât see any body tage there. Here is theme.liquid full code, please adivce.
{% render 'pagefly-head' %} {% if request.path contains 'the-2021-agenda' %} body { background-image: url({{ 'image-name-with-extension' | asset_img_url: 'original' }}); background-repeat: no-repeat; background-size: cover; } {% endif %}{%- if settings.favicon != blank -%}
{%- endif -%}{%- capture seo_title -%}
{%- if request.page_type == âsearchâ and search.performed == true -%}
{{ âgeneral.search.headingâ | t: count: search.results_count }}: {{ âgeneral.search.results_with_countâ | t: terms: search.terms, count: search.results_count }}
{%- else -%}
{{ page_title }}
{%- endif -%}
{%- if current_tags -%}
{%- assign meta_tags = current_tags | join: ', â -%} â {{ âgeneral.meta.tagsâ | t: tags: meta_tags -}}
{%- endif -%}
{%- if current_page != 1 -%}
â {{ âgeneral.meta.pageâ | t: page: current_page }}
{%- endif -%}
{%- assign escaped_page_title = page_title | escape -%}
{%- unless escaped_page_title contains shop.name -%}
â {{ shop.name }}
{%- endunless -%}
{%- endcapture -%}
{%- if page_description -%}
{%- endif -%}
{% include âsocial-meta-tagsâ %}
{{ âtheme.scss.cssâ | asset_url | stylesheet_tag }}
{{ âeboost.cssâ | asset_url | stylesheet_tag }}
{%- if request.page_type contains âcustomers/â -%}
{%- endif -%}
{% include âstarapps-pg-metaâ %}
{% include âmeteor-menuâ, load: âheadâ %}
{{ content_for_header }}
{% assign is_wcp_wholesale_customer = false %}
{% assign active_discounts = shop.metafields.wcp_active_discounts.wcp_active_discounts %}
{% assign active_discounts_array = active_discounts | split: â,â %}
{% if shop.metafields.wcp_status.wcp_status != âdisabledâ and customer %}
{% for discount_key in active_discounts_array %}
{% assign key_split = discount_key | split: â-â %}
{% assign key_split_length = key_split | size %}
{% if key_split_length > 2 %}
{% assign removeable_key = key_split.last | prepend: â-â %}
{% assign wcp_hide_sale_badge_customer_tag = discount_key | remove_first: removeable_key %}
{% else %}
{% assign wcp_hide_sale_badge_customer_tag = key_split[0] %}
{% endif %}
{% if customer.tags contains wcp_hide_sale_badge_customer_tag %}
{% assign is_wcp_wholesale_customer = true %}
{% endif %}
{% endfor %}
{% endif %}
{% unless is_wcp_wholesale_customer == true %}
{%- render âbold-options-hybridâ -%}
{%- render âbold-commonâ -%}
{% endunless %}
{% if template == âproductâ and product.metafields.inventory.ShappifyHidden or product.type contains âHIDDENâ %}{% endif %}
{% include âgem-app-header-scriptsâ %}
{% include âpagefly-headerâ %}
{% render âweglot_hreftagsâ %}
{% render âweglot_switcherâ %}
{% include âbss-product-labels-configsâ %}
{% if template == âcartâ %}{% include ârevy-bundle-scriptâ %}{% endif %}
{{ âgeneral.accessibility.skip_to_contentâ | t }}
{%- if settings.enable_ajax -%}
{% include âcart-popupâ %}
{%- endif -%}
{% section âheaderâ %}
{% if template contains âwholesaleâ %}
{% if customer %}
{% if customer.tags contains âwholesaleâ %}
{{ content_for_layout }}
{% else %}
{% include âwholesale-noteâ %}
{% endif %}
{% else %}
{% include âwholesale-noteâ %}
{% endif %}
{% else%}
{{ content_for_layout }}
{% endif %}
{% include âarpâ %}
{% section âfooterâ %}
{% include âsmile-initializerâ %}
{% include âgem-app-footer-scriptsâ %}
{% assign wcp_wholesale_customer = false %}
{% assign active_discounts = shop.metafields.wcp_active_discounts.wcp_active_discounts %}
{% assign active_discounts_array = active_discounts | split: â,â %}
{% if shop.metafields.wcp_status.wcp_status != âdisabledâ and customer %}
{% for discount_key in active_discounts_array %}
{% assign key_split = discount_key | split: â-â %}
{% assign key_split_length = key_split | size %}
{% if key_split_length > 2 %}
{% assign removeable_key = key_split.last | prepend: â-â %}
{% assign wcp_customer_tag = discount_key | remove_first: removeable_key %}
{% else %}
{% assign wcp_customer_tag = key_split[0] %}
{% endif %}
{% if customer.tags contains wcp_customer_tag %}
{% assign wcp_wholesale_customer = true %}
{% endif %}
{% endfor %}
{% endif %}
{% if wcp_wholesale_customer == false %}
{% comment %}{%render âsc-wholesale-simplifiedâ%}{% endcomment %}
{% endif %}
{% if customer.tags.size > 0 and template != âcartâ %}
{% endif %}
{% if customer.tags.size > 0 and template == âcartâ %}
{% include âwcp_cartâ %}
{% endif %}
{% if template contains âproductâ %}
.your_section_selector{background-color: gray;}{% endif %}
.section-header { margin-bottom: 50px !important; marging-top: 15px !important; } } .grid--view-items { text-align: center; margin-top: 63px !important; } h3{ font-weight: bolder !important; font-size: 14px !important; } h4{ font-weight: bolder !important; font-size: 28px !important; } h2 { font-weight: bolder !important; font-size: 28px !important; th, td { text-align: left !important; border: solid 1px #d6d4d4 !important; padding: 10px 14px !important; } {% render 'pagefly-head' %} {% if request.path contains 'the-2021-agenda' %} body { background-image: url({{ 'image-name-with-extension' | asset_img_url: 'original' }}); background-repeat: no-repeat; background-size: cover; } {% endif %}{%- if settings.favicon != blank -%}
{%- endif -%}{%- capture seo_title -%}
{%- if request.page_type == âsearchâ and search.performed == true -%}
{{ âgeneral.search.headingâ | t: count: search.results_count }}: {{ âgeneral.search.results_with_countâ | t: terms: search.terms, count: search.results_count }}
{%- else -%}
{{ page_title }}
{%- endif -%}
{%- if current_tags -%}
{%- assign meta_tags = current_tags | join: ', â -%} â {{ âgeneral.meta.tagsâ | t: tags: meta_tags -}}
{%- endif -%}
{%- if current_page != 1 -%}
â {{ âgeneral.meta.pageâ | t: page: current_page }}
{%- endif -%}
{%- assign escaped_page_title = page_title | escape -%}
{%- unless escaped_page_title contains shop.name -%}
â {{ shop.name }}
{%- endunless -%}
{%- endcapture -%}
{%- if page_description -%}
{%- endif -%}
{% include âsocial-meta-tagsâ %}
{{ âtheme.scss.cssâ | asset_url | stylesheet_tag }}
{{ âeboost.cssâ | asset_url | stylesheet_tag }}
{%- if request.page_type contains âcustomers/â -%}
{%- endif -%}
{% include âstarapps-pg-metaâ %}
{% include âmeteor-menuâ, load: âheadâ %}
{{ content_for_header }}
{% assign is_wcp_wholesale_customer = false %}
{% assign active_discounts = shop.metafields.wcp_active_discounts.wcp_active_discounts %}
{% assign active_discounts_array = active_discounts | split: â,â %}
{% if shop.metafields.wcp_status.wcp_status != âdisabledâ and customer %}
{% for discount_key in active_discounts_array %}
{% assign key_split = discount_key | split: â-â %}
{% assign key_split_length = key_split | size %}
{% if key_split_length > 2 %}
{% assign removeable_key = key_split.last | prepend: â-â %}
{% assign wcp_hide_sale_badge_customer_tag = discount_key | remove_first: removeable_key %}
{% else %}
{% assign wcp_hide_sale_badge_customer_tag = key_split[0] %}
{% endif %}
{% if customer.tags contains wcp_hide_sale_badge_customer_tag %}
{% assign is_wcp_wholesale_customer = true %}
{% endif %}
{% endfor %}
{% endif %}
{% unless is_wcp_wholesale_customer == true %}
{%- render âbold-options-hybridâ -%}
{%- render âbold-commonâ -%}
{% endunless %}
{% if template == âproductâ and product.metafields.inventory.ShappifyHidden or product.type contains âHIDDENâ %}{% endif %}
{% include âgem-app-header-scriptsâ %}
{% include âpagefly-headerâ %}
{% render âweglot_hreftagsâ %}
{% render âweglot_switcherâ %}
{% include âbss-product-labels-configsâ %}
{% if template == âcartâ %}{% include ârevy-bundle-scriptâ %}{% endif %}
{{ âgeneral.accessibility.skip_to_contentâ | t }}
{%- if settings.enable_ajax -%}
{% include âcart-popupâ %}
{%- endif -%}
{% section âheaderâ %}
{% if template contains âwholesaleâ %}
{% if customer %}
{% if customer.tags contains âwholesaleâ %}
{{ content_for_layout }}
{% else %}
{% include âwholesale-noteâ %}
{% endif %}
{% else %}
{% include âwholesale-noteâ %}
{% endif %}
{% else%}
{{ content_for_layout }}
{% endif %}
{% include âarpâ %}
{% section âfooterâ %}
{% include âsmile-initializerâ %}
{% include âgem-app-footer-scriptsâ %}
{% assign wcp_wholesale_customer = false %}
{% assign active_discounts = shop.metafields.wcp_active_discounts.wcp_active_discounts %}
{% assign active_discounts_array = active_discounts | split: â,â %}
{% if shop.metafields.wcp_status.wcp_status != âdisabledâ and customer %}
{% for discount_key in active_discounts_array %}
{% assign key_split = discount_key | split: â-â %}
{% assign key_split_length = key_split | size %}
{% if key_split_length > 2 %}
{% assign removeable_key = key_split.last | prepend: â-â %}
{% assign wcp_customer_tag = discount_key | remove_first: removeable_key %}
{% else %}
{% assign wcp_customer_tag = key_split[0] %}
{% endif %}
{% if customer.tags contains wcp_customer_tag %}
{% assign wcp_wholesale_customer = true %}
{% endif %}
{% endfor %}
{% endif %}
{% if wcp_wholesale_customer == false %}
{% comment %}{%render âsc-wholesale-simplifiedâ%}{% endcomment %}
{% endif %}
{% if customer.tags.size > 0 and template != âcartâ %}
{% endif %}
{% if customer.tags.size > 0 and template == âcartâ %}
{% include âwcp_cartâ %}
{% endif %}
{% if template contains âproductâ %}
.your_section_selector{background-color: gray;}{% endif %}
.section-header { margin-bottom: 50px !important; marging-top: 15px !important; } } .grid--view-items { text-align: center; margin-top: 63px !important; } h3{ font-weight: bolder !important; font-size: 14px !important; } h4{ font-weight: bolder !important; font-size: 28px !important; } h2 { font-weight: bolder !important; font-size: 28px !important; th, td { text-align: left !important; border: solid 1px #d6d4d4 !important; padding: 10px 14px !important; }
{% render 'pagefly-head' %}
{% if request.path contains 'the-2021-agenda' %}
{% endif %}
{%- if settings.favicon != blank -%}
{%- endif -%}
{%- capture seo_title -%}
{%- if request.page_type == 'search' and search.performed == true -%}
{{ 'general.search.heading' | t: count: search.results_count }}: {{ 'general.search.results_with_count' | t: terms: search.terms, count: search.results_count }}
{%- else -%}
{{ page_title }}
{%- endif -%}
{%- if current_tags -%}
{%- assign meta_tags = current_tags | join: ', ' -%} â {{ 'general.meta.tags' | t: tags: meta_tags -}}
{%- endif -%}
{%- if current_page != 1 -%}
â {{ 'general.meta.page' | t: page: current_page }}
{%- endif -%}
{%- assign escaped_page_title = page_title | escape -%}
{%- unless escaped_page_title contains shop.name -%}
â {{ shop.name }}
{%- endunless -%}
{%- endcapture -%}
{%- if page_description -%}
{%- endif -%}
{% include 'social-meta-tags' %}
{{ 'theme.scss.css' | asset_url | stylesheet_tag }}
{{ 'eboost.css' | asset_url | stylesheet_tag }}
{%- if request.page_type contains 'customers/' -%}
{%- endif -%}
{% include "starapps-pg-meta" %}
{% include 'meteor-menu', load: 'head' %}
{{ content_for_header }}
{% assign is_wcp_wholesale_customer = false %}
{% assign active_discounts = shop.metafields.wcp_active_discounts.wcp_active_discounts %}
{% assign active_discounts_array = active_discounts | split: ',' %}
{% if shop.metafields.wcp_status.wcp_status != 'disabled' and customer %}
{% for discount_key in active_discounts_array %}
{% assign key_split = discount_key | split: '-' %}
{% assign key_split_length = key_split | size %}
{% if key_split_length > 2 %}
{% assign removeable_key = key_split.last | prepend: '-' %}
{% assign wcp_hide_sale_badge_customer_tag = discount_key | remove_first: removeable_key %}
{% else %}
{% assign wcp_hide_sale_badge_customer_tag = key_split[0] %}
{% endif %}
{% if customer.tags contains wcp_hide_sale_badge_customer_tag %}
{% assign is_wcp_wholesale_customer = true %}
{% endif %}
{% endfor %}
{% endif %}
{% unless is_wcp_wholesale_customer == true %}
{%- render 'bold-options-hybrid' -%}
{%- render 'bold-common' -%}
{% endunless %}
{% if template == 'product' and product.metafields.inventory.ShappifyHidden or product.type contains '_HIDDEN_' %}{% endif %}
{% include 'gem-app-header-scripts' %}
{% include 'pagefly-header' %}
{% render 'weglot_hreftags' %}
{% render 'weglot_switcher' %}
{% include 'bss-product-labels-configs' %}
{% if template == 'cart' %}{% include "revy-bundle-script" %}{% endif %}
{{ 'general.accessibility.skip_to_content' | t }}
{%- if settings.enable_ajax -%}
{% include 'cart-popup' %}
{%- endif -%}
{% section 'header' %}
{% section 'footer' %}
{{- 'sections.slideshow.navigation_instructions' | t -}}
- {{ 'general.accessibility.refresh_page' | t }}
- {{ 'general.accessibility.selection_help' | t }}
{% include 'magisto' %}
{% comment %}This is for Badge Master By Hulkapps{% endcomment %} {% include 'hulkcode_trustbadge' %}
{% render 'hextom_usb_main', product: product, customer: customer %}
{% include 'smile-initializer' %}
{% include 'gem-app-footer-scripts' %}
{% assign wcp_wholesale_customer = false %}
{% assign active_discounts = shop.metafields.wcp_active_discounts.wcp_active_discounts %}
{% assign active_discounts_array = active_discounts | split: ',' %}
{% if shop.metafields.wcp_status.wcp_status != 'disabled' and customer %}
{% for discount_key in active_discounts_array %}
{% assign key_split = discount_key | split: '-' %}
{% assign key_split_length = key_split | size %}
{% if key_split_length > 2 %}
{% assign removeable_key = key_split.last | prepend: '-' %}
{% assign wcp_customer_tag = discount_key | remove_first: removeable_key %}
{% else %}
{% assign wcp_customer_tag = key_split[0] %}
{% endif %}
{% if customer.tags contains wcp_customer_tag %}
{% assign wcp_wholesale_customer = true %}
{% endif %}
{% endfor %}
{% endif %}
{% if wcp_wholesale_customer == false %}
{% comment %}{%render 'sc-wholesale-simplified'%}{% endcomment %}
{% endif %}
{% if customer.tags.size > 0 and template != 'cart' %}
{% endif %}
{% if customer.tags.size > 0 and template == 'cart' %}
{% include 'wcp_cart' %}
{% endif %}
{% if template contains 'product' %}
{% endif %}
{% endif %}
{%- if settings.favicon != blank -%}
{%- endif -%}
{%- capture seo_title -%}
{%- if request.page_type == 'search' and search.performed == true -%}
{{ 'general.search.heading' | t: count: search.results_count }}: {{ 'general.search.results_with_count' | t: terms: search.terms, count: search.results_count }}
{%- else -%}
{{ page_title }}
{%- endif -%}
{%- if current_tags -%}
{%- assign meta_tags = current_tags | join: ', ' -%} â {{ 'general.meta.tags' | t: tags: meta_tags -}}
{%- endif -%}
{%- if current_page != 1 -%}
â {{ 'general.meta.page' | t: page: current_page }}
{%- endif -%}
{%- assign escaped_page_title = page_title | escape -%}
{%- unless escaped_page_title contains shop.name -%}
â {{ shop.name }}
{%- endunless -%}
{%- endcapture -%}
{%- if page_description -%}
{%- endif -%}
{% include 'social-meta-tags' %}
{{ 'theme.scss.css' | asset_url | stylesheet_tag }}
{{ 'eboost.css' | asset_url | stylesheet_tag }}
{%- if request.page_type contains 'customers/' -%}
{%- endif -%}
{% include "starapps-pg-meta" %}
{% include 'meteor-menu', load: 'head' %}
{{ content_for_header }}
{% assign is_wcp_wholesale_customer = false %}
{% assign active_discounts = shop.metafields.wcp_active_discounts.wcp_active_discounts %}
{% assign active_discounts_array = active_discounts | split: ',' %}
{% if shop.metafields.wcp_status.wcp_status != 'disabled' and customer %}
{% for discount_key in active_discounts_array %}
{% assign key_split = discount_key | split: '-' %}
{% assign key_split_length = key_split | size %}
{% if key_split_length > 2 %}
{% assign removeable_key = key_split.last | prepend: '-' %}
{% assign wcp_hide_sale_badge_customer_tag = discount_key | remove_first: removeable_key %}
{% else %}
{% assign wcp_hide_sale_badge_customer_tag = key_split[0] %}
{% endif %}
{% if customer.tags contains wcp_hide_sale_badge_customer_tag %}
{% assign is_wcp_wholesale_customer = true %}
{% endif %}
{% endfor %}
{% endif %}
{% unless is_wcp_wholesale_customer == true %}
{%- render 'bold-options-hybrid' -%}
{%- render 'bold-common' -%}
{% endunless %}
{% if template == 'product' and product.metafields.inventory.ShappifyHidden or product.type contains '_HIDDEN_' %}{% endif %}
{% include 'gem-app-header-scripts' %}
{% include 'pagefly-header' %}
{% render 'weglot_hreftags' %}
{% render 'weglot_switcher' %}
{% include 'bss-product-labels-configs' %}
{% if template == 'cart' %}{% include "revy-bundle-script" %}{% endif %}
{{ 'general.accessibility.skip_to_content' | t }}
{%- if settings.enable_ajax -%}
{% include 'cart-popup' %}
{%- endif -%}
{% section 'header' %}
{% section 'footer' %}
{{- 'sections.slideshow.navigation_instructions' | t -}}
- {{ 'general.accessibility.refresh_page' | t }}
- {{ 'general.accessibility.selection_help' | t }}
{% include 'magisto' %}
{% comment %}This is for Badge Master By Hulkapps{% endcomment %} {% include 'hulkcode_trustbadge' %}
{% render 'hextom_usb_main', product: product, customer: customer %}
{% include 'smile-initializer' %}
{% include 'gem-app-footer-scripts' %}
{% assign wcp_wholesale_customer = false %}
{% assign active_discounts = shop.metafields.wcp_active_discounts.wcp_active_discounts %}
{% assign active_discounts_array = active_discounts | split: ',' %}
{% if shop.metafields.wcp_status.wcp_status != 'disabled' and customer %}
{% for discount_key in active_discounts_array %}
{% assign key_split = discount_key | split: '-' %}
{% assign key_split_length = key_split | size %}
{% if key_split_length > 2 %}
{% assign removeable_key = key_split.last | prepend: '-' %}
{% assign wcp_customer_tag = discount_key | remove_first: removeable_key %}
{% else %}
{% assign wcp_customer_tag = key_split[0] %}
{% endif %}
{% if customer.tags contains wcp_customer_tag %}
{% assign wcp_wholesale_customer = true %}
{% endif %}
{% endfor %}
{% endif %}
{% if wcp_wholesale_customer == false %}
{% comment %}{%render 'sc-wholesale-simplified'%}{% endcomment %}
{% endif %}
{% if customer.tags.size > 0 and template != 'cart' %}
{% endif %}
{% if customer.tags.size > 0 and template == 'cart' %}
{% include 'wcp_cart' %}
{% endif %}
{% if template contains 'product' %}
{% endif %}
you can add new code for theme.liquid
Hi Victor,
When you click âAdd to cartâ botton from PageFly ection, it adds to the cart but also goes to the cart page. It is not supposed to go to the cart page.
Hi @Alliance ,
I checked and fix your issue, you can re-check and give me feedback
Yes. You fixed it from PageFly end. Thank you
Great! Iâm glad to hear that it works well on your end ![]()