Vue.js Components
The B2Bsellers Suite utilizes an extensible Vue.js architecture inspired by the Shopware Administration. This allows you to use, extend, or completely override existing components to fit your specific project requirements.
Extensibility & Reusability
To accelerate your development and ensure a consistent UI/UX across the B2B platform, we provide a library of pre-built components. These range from simple UI helpers to complex, data-driven modules.
Localizations & Components
All components are fully compatible with Shopware's translation system. You can pass snippets directly into components to maintain multi-language support.
Usage Example
You can implement these components within your custom views. Below is a standard implementation example using our translation keys:
<b2b-modal
:title="$t('b2b-platform.custom-extension.modalTitle')"
@close="onClose">
<b2b-product-search @select="onProductSelect" />
</b2b-modal>Architecture
Components are registered using the B2B Platform's global component system:
Since these components follow the Shopware Administration pattern, you can use the Component.extend or Component.override methods to modify core behavior without losing update compatibility.
Development Guidelines
Template Separation: Always use external templates
.html.twigStyle Scoping: Import component-specific styles via
.scssfilesProp Validation: Define prop types and defaults
Event Documentation: Emit events with clear naming
Service Injection: Use
injectfor API and utility servicesReactive Updates: Use
this.$set()for dynamic property updatesDebouncing: Use lodash debounce for search/input handlers
Loading States: Always provide visual feedback during async operations
Error Handling: Show user-friendly error messages via
$notifyAccessibility: Support keyboard navigation where applicable
Best Practices
Component Naming: Use kebab-case for component names (e.g., , not ProductSearch) product-search
Props vs Data: Use props for parent communication, data for internal state
Computed vs Methods: Use computed properties for derived values, methods for actions
Event Naming: Use kebab-case with descriptive verbs (e.g., change-query, update-active)
API Calls: Always inject apiService and handle errors gracefully
Translations: Use this.$trans() for all user-facing text
State Management: Use Vuex for shared state, component data for local state
Last updated
Was this helpful?