Bagisto: how to show the shopping cart as modal after adding an item to it

Created on 20 Aug 2020  路  4Comments  路  Source: bagisto/bagisto

hi i want to show a modal to my user with the content of the shopping cart after he adds a product to the cart . as i saw the page is reloaded after the submit of form . i wanted to know how can i do or try this . i fell i should add the code after the alert here in add-t-cart.vue

 window.showAlert(`alert-success`, this.__('shop.general.alert.success'), response.data.message);

thanks in advance

Help Wanted

Most helpful comment

HI @farshadff

You can add modal in this file's addToCart method and also need to write code for this in an add-to-cart.blade.php file.

All 4 comments

HI @farshadff

You can add modal in this file's addToCart method and also need to write code for this in an add-to-cart.blade.php file.

thanks but i think i have to add some js or vue code to show it after the form submit because adding that to this file will show it when page loads or just before submit of form . beside this is partial and cant add script tag to it i think

Hi @farshadff

Definitely you need to add some js code.

thanks for the answer i will try to figure out how to do that and update the thread

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rajexact picture rajexact  路  3Comments

alkhachatryan picture alkhachatryan  路  7Comments

nguyenthanhtuanIT picture nguyenthanhtuanIT  路  4Comments

farshadff picture farshadff  路  6Comments

dakisan picture dakisan  路  4Comments