Announcement

Collapse
No announcement yet.

Redis and Smart Breadcrumbs Issue

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Redis and Smart Breadcrumbs Issue

    I seem to be having an issue with the smart breadcrumbs when Redis is enabled.

    Prior to enabling Redis, products could be assigned to multiple categories and the breadcrumbs would match the path you took to get to the product when you land on the product page.

    With Redis enabled, it only shows the path based on the product's canonical category code, which I believe is the fallback for when a user comes directly to a product page, which in this case is mostly Google Shopping Ads.


    Example Behavior:

    Product 1 is assigned to Category 1, Category 2 and Category 3 with Category 1 being the canonical category

    Breadcrumbs with Redis Disabled:

    Path 1: Category 1 > Product 1
    Breadcrumbs: Category 1 > Product 1

    Path 2: Category 2 > Product 1
    Breadcrumbs: Category 2 > Product 1

    Path 3: Category 3 > Product 1
    Breadcrumbs: Category 3 > Product 1

    Breadcrumbs with Redis Enabled:

    Path 1: Category 1 > Product 1
    Breadcrumbs: Category 1 > Product 1

    Path 2: Category 2 > Product 1
    Breadcrumbs: Category 1 > Product 1

    Path 3: Category 3 > Product 1
    Breadcrumbs: Category 1 > Product 1


    I do have some Transients set up with Tess's Module, so maybe there is a conflict.

    The Transients are mostly used for caching chunks of SMT code that doesn't change often Globally and on the CTGY page templates (there are a couple versions).

    The smart breadcrumbs are not cached by a transient.

    Global chunks include (code is in Content Sections):
    • navigation bar
    • main shop menu (uses navigation set)
    • promo/checkout progress bar
    • page titles (h1 tags for most pages)

    CTGY chunks include (code is in Content Sections):
    • canonical links
    • JSON-LD item list for the products
    • product count
    • subcategory listings
    • related categories (using navigation sets)

    Points for reference:
    • site is on the Suivant Readytheme
    • all products have a canonical category assigned
    • all pages are set to "Cache Only if the Basket is Empty and No Customer is logged In"
    • I have converted the write_basket custom fields to session storage for all the continue shopping links ( https://github.com/mivaecommerce/rea...dows/issues/64 )
    • added extra cache settings for ads and their url parameters on top of what was already there from Miva.

    I have Disabled Redis for now, but if anyone might be able to chime with any insight, it would be greatly appreciated.

    Thanks
    Nick Harkins
    www.loveisarose.com

    #2
    I checked with dev on this and its intentional that we always use the canonical category code to control the breadcrumbs when Redis is being used. Normally, in a non-cached page load of a product, Miva looks at the page refer to determine what category to set for the breadcrumbs. The problem with this for cached pages is a product could be in multiple categories so depending on how the customer got to the product page when the product was cached the cached page could have one set of breadcrumbs or another. We made a choice to always use the canonical category of the product (or the first category the product was assigned to if the canonical category is not set) anytime a page is being saved in redis for cache.
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment


      #3
      Brennan Ahh I see. Well that is good to know. I thought I broke something lol but that makes sense.

      Any chance I could bypass the breadcrumbs being cached with SMT code using the new X-Partial-Render Header and maybe mvt:call or miva_output_header?
      Nick Harkins
      www.loveisarose.com

      Comment

      Working...
      X