mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +00:00
test: Product Query & Filter Engine, Item Group Page
- Test for ProductQuery engine and ProductFilters engine - Test for engine for Item Group too - Renamed ‘product_configurator’ to ‘variant_selector’ - Cleaned up filters.py - Modal freeze backdrop lighter only in cart, since there’s nothing over it - Fixed unusual spacing in variant selector dialog - Made `get_child_groups_for_website` more readable - Replaced ‘Configure’ with ‘Select’ for variant selection
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
|
||||
<div class="mt-5 mb-6">
|
||||
{% if cart_settings.enable_variants | int %}
|
||||
<button class="btn btn-primary-light btn-configure font-md"
|
||||
<button class="btn btn-primary-light btn-configure font-md mr-2"
|
||||
data-item-code="{{ doc.name }}"
|
||||
data-item-name="{{ doc.item_name }}"
|
||||
>
|
||||
{{ _('Configure') }}
|
||||
{{ _('Select Variant') }}
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if cart_settings.show_contact_us_button %}
|
||||
|
||||
@@ -29,7 +29,7 @@ class ItemConfigure {
|
||||
});
|
||||
|
||||
this.dialog = new frappe.ui.Dialog({
|
||||
title: __('Configure {0}', [this.item_name]),
|
||||
title: __('Select Variant for {0}', [this.item_name]),
|
||||
fields,
|
||||
on_hide: () => {
|
||||
set_continue_configuration();
|
||||
@@ -280,14 +280,14 @@ class ItemConfigure {
|
||||
}
|
||||
|
||||
get_next_attribute_and_values(selected_attributes) {
|
||||
return this.call('erpnext.e_commerce.product_configurator.utils.get_next_attribute_and_values', {
|
||||
return this.call('erpnext.e_commerce.variant_selector.utils.get_next_attribute_and_values', {
|
||||
item_code: this.item_code,
|
||||
selected_attributes
|
||||
});
|
||||
}
|
||||
|
||||
get_attributes_and_values() {
|
||||
return this.call('erpnext.e_commerce.product_configurator.utils.get_attributes_and_values', {
|
||||
return this.call('erpnext.e_commerce.variant_selector.utils.get_attributes_and_values', {
|
||||
item_code: this.item_code
|
||||
});
|
||||
}
|
||||
@@ -311,9 +311,9 @@ function set_continue_configuration() {
|
||||
const { itemCode } = $btn_configure.data();
|
||||
|
||||
if (localStorage.getItem(`configure:${itemCode}`)) {
|
||||
$btn_configure.text(__('Continue Configuration'));
|
||||
$btn_configure.text(__('Continue Selection'));
|
||||
} else {
|
||||
$btn_configure.text(__('Configure'));
|
||||
$btn_configure.text(__('Select Variant'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user