Skip to content
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

[Warehouse Theme] - Product not displayed on Wishlist page #38

Open
Dovriik opened this issue Oct 13, 2022 · 1 comment
Open

[Warehouse Theme] - Product not displayed on Wishlist page #38

Dovriik opened this issue Oct 13, 2022 · 1 comment

Comments

@Dovriik
Copy link

Dovriik commented Oct 13, 2022

Hi dlerm!
I follow your instructions and manage to have the console run correctly but the Wishlist page doesn't render the item, just an empty box (two of them in the picture below, as you can see).

Empty Wishlist Page

Here is the code for the product-card-template.liquid:
`{% comment %}
Shopify Wishlist
Usage:
- Replace the snippet name ('product-card') with your existing product card snippet
- Pass the product object as a snippet variable named 'product'
{% endcomment %}
{%- render 'product-info', product: product -%}

{% schema %}
{
"templates": ["product"]
}
{% endschema %}`

Here is the link to the code for the product-info.liquid (since it's long, I will use Pastebin). I paste your line of code to render the wishlist button on line 22:
https://pastebin.com/F9s1p6q7

Here is the image of the heart icon, but it's statis, there is no change whether I click on it or not:

image

Also, in your Wishlist.js, I need to modified it a bit (row 6, I have changed in the selectors list the productCard: '.product-card' to productCard:'.card'). Since if I don't made this modification, this will happen in the browser console:
image

Maybe because I use the wrong product snippet file to begin with? I don't really know since I have no coding background.
Also, my apologies if my issues post is a mess, this is the first time I use Github.

Thank you very much for your help and support!

@dlerm
Copy link
Owner

dlerm commented Jul 12, 2023

@Dovriik Looking at you pastebin file, it seems that product card snippet you are referencing ("product-info") is actually meant for your product template instead of for collections (product listings). It has many references to section variables that would not exist in the context of the product.card.json template and product-card-template section defined in the wishlist project code.

The product card you are looking for (based on Warehouse theme) will have the class "product-item" on it. Unfortunately I'm not sure what the file name is as I don't have access to the warehouse theme code, just the demo store pages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants