# For latest version
yarn add git+ssh://git@bitbucket.org:akinonteam/pz-b2b.git
# For specific version
yarn add git+ssh://git@bitbucket.org:akinonteam/pz-b2b.git#xxxxxxx
Add ACCOUNT_MY_QUOTATIONS route into ACCOUNT_ROUTES
enum ACCOUNT_ROUTES {
...,
ACCOUNT_MY_QUOTATIONS = '/users/my-quotations'
}
Add my quotes link to account menu
const ACCOUNT_MENU_ITEMS = [
...,
{
translationKey: 'account.base.menu.my_quotations',
href: ROUTES.ACCOUNT_MY_QUOTATIONS,
testId: 'account-my-quotations'
}
];
Add translation to account.base.menu. Apply this for every language
"my_quotations": "My Quotations"
"my_quotations": "Tüm Tekliflerim"
Add the translation inside the product object. Apply this for every language
"store_select_modal": {
"title": "CHOOSE STORE",
"store_name": "STORE NAME",
"quantity": "QUANTITY",
"add_to_basket": "Add to Basket",
"valid_quantity": "Please select a store and enter a valid quantity"
}
"store_select_modal": {
"title": "MAĞAZA SEÇ",
"store_name": "MAĞAZA ADI",
"quantity": "ADET",
"add_to_basket": "SEPETE EKLE",
"valid_quantity": "Lütfen bir mağaza seçin ve geçerli bir miktar girin"
}
Add the translation inside the basket object. Apply this for every language
"b2b": {
"my_cart": "My Cart",
"back_to_shopping": "BACK TO SHOPPING",
"save_cart": "SAVE CART",
"request_quote": "REQUEST A QUOTE",
"total_price": "Catalog Total Price (Excl. Tax)",
"save_cart_modal": {
"title": "SAVE CART",
"cart_name": "Cart Name",
"save_cart_button": "SAVE CART"
},
"request_quote_modal": {
"title": "REQUEST A QUOTE",
"quotation_name": "Quotation Name",
"button": "SAVE"
},
"remove_product_modal": {
"title": "DELETE AND ADD TO FAVORITES",
"description": "Would you like to add this product you want to delete to your favorites?",
"add_to_favorites_button": "ADD TO FAVORITES",
"delete_product_button": "delete product"
},
"empty": {
"title": "Your cart is empty, would you like to continue with your saved carts?",
"button": "SELECT CART",
"choose_cart_placeholder": "Chose a cart"
},
"table": {
"basket_qty": "<Qty /> Products",
"delete": "Delete",
"name_sku": "NAME & SKU",
"price": "PRICE",
"quantity": "QTY",
"store_name": "STORE NAME",
"store_qty": "STORE QTY",
"subtotal": "SUBTOTAL"
}
}
"b2b": {
"my_cart": "Sepetim",
"back_to_shopping": "ALIŞVERİŞE GERİ DÖN",
"save_cart": "SEPETİ KAYDET",
"request_quote": "TEKLİF İSTE",
"total_price": "Katalog Toplam Fiyatı (Vergi Hariç)",
"save_cart_modal": {
"title": "SEPETİ KAYDET",
"cart_name": "Sepet Adı",
"save_cart_button": "SEPETİ KAYDET"
},
"request_quote_modal": {
"title": "TEKLİF İSTE",
"quotation_name": "Teklif Adı",
"button": "KAYDET"
},
"remove_product_modal": {
"title": "SİL VE FAVORİLERE EKLE",
"description": "Silmek istediğiniz bu ürünü favorilerinize eklemek ister misiniz?",
"add_to_favorites_button": "FAVORİLERE EKLE",
"delete_product_button": "ürünü sil"
},
"empty": {
"title": "Sepetiniz boş, kaydettiğiniz sepetlerle devam etmek ister misiniz?",
"button": "SEPETİ SEÇ",
"choose_cart_placeholder": "Bir sepet seçin"
},
"table": {
"basket_qty": "<Qty /> Ürün",
"delete": "Sil",
"name_sku": "AD & SKU",
"price": "FİYAT",
"quantity": "ADET",
"store_name": "MAĞAZA ADI",
"store_qty": "MAĞAZA ADEDİ",
"subtotal": "ARA TOPLAM"
}
}
Update destination path for basket route
rewrites: [
{
source: ROUTES.BASKET,
destination: '/basket-b2b'
}
],
Add rewrite url
rewrites: [
...,
{
source: ROUTES.ACCOUNT_MY_QUOTATIONS,
destination: '/account/my-quotations'
}
],
Add plugin name
module.exports = ["...", "pz-b2b"];
Add imports
import { useB2b, StoreModal } from "@akinon/pz-b2b";
Add useB2b hook
const {
openSelectStoreModal,
setOpenSelectStoreModal,
divisions,
divisionLoading,
B2bButton,
} = useB2b();
Add open modal button
<B2bButton buttonText={t("product.add_to_cart")} />
Add the end in the return
{
!divisionLoading && (
<StoreModal
storeData={divisions}
productPk={data.product.pk}
open={openSelectStoreModal}
setOpen={setOpenSelectStoreModal}
/>
)
}