Appearance
useB2bQuoteManagement ​
Definition ​
Composable to manage quotes in the B2BQuote module.
Signature ​
ts
export function useB2bQuoteManagement(): UseB2bQuoteManagement 
Return type ​
ts
UseB2bQuoteManagement
Properties ​
| Name | Type | Description | 
|---|
Usage ​
Get quote list ​
vue
<script setup lang="ts">
    import { useB2bQuoteManagement } from "@shopware-pwa/composables-next";
    const quotesList = ref([]);
    const { getQuoteList } = useB2bQuoteManagement();
    onBeforeMount(async () => {
        quotesList.value = await getQuoteList();
    });
</script>
Get quote ​
vue
<script setup lang="ts">
    import { useB2bQuoteManagement } from "@shopware-pwa/composables-next";
    const quote = ref();
    const { getQuote } = useB2bQuoteManagement();
    onBeforeMount(async () => {
        quotesList.value = await getQuote('example-123');
    });
</script>
Decline quote ​
vue
<script setup lang="ts">
    import { useB2bQuoteManagement } from "@shopware-pwa/composables-next";
    const { declineQuote } = useB2bQuoteManagement();
    declineQuote('example-123', 'comment');
</script>
Decline quote ​
vue
<script setup lang="ts">
    import { useB2bQuoteManagement } from "@shopware-pwa/composables-next";
    const { declineQuote } = useB2bQuoteManagement();
    declineQuote('example-123', 'comment');
</script>
Request change in quote ​
vue
<script setup lang="ts">
    import { useB2bQuoteManagement } from "@shopware-pwa/composables-next";
    const { requestChangeQuote } = useB2bQuoteManagement();
    requestChangeQuote('example-123', 'comment');
</script>
Request quote ​
vue
<script setup lang="ts">
    import { useB2bQuoteManagement } from "@shopware-pwa/composables-next";
    const { requestQuote } = useB2bQuoteManagement();
    requestQuote('comment');
</script>
Create order from quote ​
vue
<script setup lang="ts">
    import { useB2bQuoteManagement } from "@shopware-pwa/composables-next";
    const { createOrderFromQuote } = useB2bQuoteManagement();
    requestQuote('example-123', 'comment');
</script>
Change quote shipping method ​
vue
<script setup lang="ts">
    import { useB2bQuoteManagement } from "@shopware-pwa/composables-next";
    const { changeShippingMethod } = useB2bQuoteManagement();
    changeShippingMethod('example-123', 'shipping-method-id');
</script>
Change quote payment method ​
vue
<script setup lang="ts">
    import { useB2bQuoteManagement } from "@shopware-pwa/composables-next";
    const { changePaymentMethod } = useB2bQuoteManagement();
    changePaymentMethod('example-123', 'payment-method-id');
</script>