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

Shopping List for Category Page #58

Open
1 task
SunilP-WassDigital opened this issue Jun 28, 2024 · 0 comments
Open
1 task

Shopping List for Category Page #58

SunilP-WassDigital opened this issue Jun 28, 2024 · 0 comments
Labels

Comments

@SunilP-WassDigital
Copy link

SunilP-WassDigital commented Jun 28, 2024

Type: (Select one)

  • Feature Request

Requirement :

  • Add shopping List button on Category page or Home Page

I m using below tutorial to do that
https://help.bundleb2b.com/en/articles/7322862-hard-coding-floating-action-buttons

Implement
`templates/components/f/products/card.html

<button class="add-to-shopping-list" data-product-id="{{id}}" data-sku="{{sku}}">Add to shopping list</button>
<script>
    document.addEventListener("DOMContentLoaded", function() {
        $(".add-to-shopping-list").on('click', function (event) {
            let pId = $(this).attr('data-product-id');
            let sku = $(this).attr('data-sku');
            b2b.utils.shoppingList.addProductFromPage({
                quantity: 1,
                productEntityId: pId,
                selectedOptions:[],
                sku: sku,
                variantEntityId:118019
            })
        });
    })
</script>

`

Expected Behavior:

  • it should be work shopping list with varient product
  • when click on Ok button into shopping list selection nothing happen

Actual Behavior:

  • it should be add into shopping list

Debugging
On click on shopping list , it showing selection of shopping list but when click on "OK" nothing happen
Debugging more found that
https://github.com/bigcommerce/b2b-buyer-portal/blob/main/apps/storefront/src/pages/PDP/index.tsx#L175 it is going to this file, where it is need pdp form and all thing. Even i m not getting actual click event of element as well.

@SunilP-WassDigital SunilP-WassDigital changed the title Issue report or feature request Shopping List for Category Page Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants