Coder Social home page Coder Social logo

Comments (11)

jerrypena1 avatar jerrypena1 commented on August 17, 2024 1

Hi @rutledgespence I'll try to replicate it.

from frontend-sdk.

jerrypena1 avatar jerrypena1 commented on August 17, 2024 1

@rutledgespence, this is what I got back from Klevu:

Yes, we agree that it's always better to use unique attributes: ids/handle when synching category pages. In fact, this has been already added to our backlog as a part of backend design changes. Please allow us to share a bit more information about the different records type (Blog Pages/CMS Pages/Collection and Products) we sync via our native Shopify app.
When synching category/collection pages, the app is syncing them as a separate record i.e. collection page, this doesn't contain any product information, it's just a collection page that has category/collection ids, name, description. The data synched as a part of collection are used for generating category/collection suggestions in search results dropdown.
When synching products, the app is indexing different attributes (including tags and metafields) along with category/collection information. While synching category/collection information, the app is only obtaining collection title and indexing them as a part of product data. When you are querying on the frontend, Klevu Shopify app uses liquid template to obtain the collection title and the same is used to query the products from specific categories. We understand that Shopify allows creating multiple collection with same title and when indexing products, Klevu app will continue to sync the collection information however, on the frontend, when you query, due to duplicate collection name you will receive all products where the collection title is matching.
At the moment, we don't have any straight forward option to sync collection handle/id instead of collection title. In this case, we recommend using collection title while querying for products for specific collection. If you are planning to add multiple collections with same title or if you have any examples already, please do let us know and will double check that there are no issues with sync.

from frontend-sdk.

jerrypena1 avatar jerrypena1 commented on August 17, 2024

@rutledgespence I created a collection called "Valentine's" and performed a sync. I was then able to query the products by performing this search:

  const result = await KlevuFetch(
    categoryMerchandising(
      "valentine\'s",
      {
        id: "search",
        limit: 36
      },
      listFilters({
        rangeFilterSettings: [
          {
            key: "klevu_price",
            minMax: true
          }
        ],
        filterManager: manager
      }),
      applyFilterWithManager(manager),
      sendMerchandisingViewEvent("valentines")
    )
  );

Please let me know if this isn't working for you.

from frontend-sdk.

rutledgespence avatar rutledgespence commented on August 17, 2024

Hey @jerrypena1 appreciate you dropping the reference - total oversight on my end. I was trying to query the collection handles when it should be the collection titles. Appreciate your help!

from frontend-sdk.

rutledgespence avatar rutledgespence commented on August 17, 2024

Is there any possibility of flipping the query to the collection handles by chance? It's a bit complex when loading in a react app into a shopify theme where the collection handles define the collection you're on and without doing another api call to shopify you can't really grab a url param id to query on the initial page load. ie. our collection handle for the Valentine's collection is "valentines" but since the title is "Valentine's" the query terms should actually be "valentine's". @jerrypena1

from frontend-sdk.

jerrypena1 avatar jerrypena1 commented on August 17, 2024

@rutledgespence not that I'm aware of. The Shopify app works off of the titles during the indexing process.

from frontend-sdk.

rutledgespence avatar rutledgespence commented on August 17, 2024

Interesting - I wonder why that was chosen. In Shopify you can't have two collections with the same handle but you can have two collections with the same title. What happens in Klevu with collections that have the same title? Does one just not get indexed? @jerrypena1

from frontend-sdk.

rutledgespence avatar rutledgespence commented on August 17, 2024

@jerrypena1 just following up on the question above so I can transfer this knowledge to our merchandising team

from frontend-sdk.

jerrypena1 avatar jerrypena1 commented on August 17, 2024

hi @rutledgespence , I'm discussing this further with the dev team internally to see if there is any more information or better yet another option.

from frontend-sdk.

rallu avatar rallu commented on August 17, 2024

Closing without resolving.

from frontend-sdk.

rutledgespence avatar rutledgespence commented on August 17, 2024

Bummer okay thanks

from frontend-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.