### Basic Formula Setup with Helper Column Source: https://github.com/cobbyio/docs/blob/main/how-to/images/image-formula-examples.md An example workflow demonstrating the use of a helper column to store original image data, allowing for safe and testable modifications to image formulas. ```excel =IMAGES.REPLACELABELS([@[Images Helper]];[@[Product Name]]) ``` -------------------------------- ### Run Magento 2 Setup Commands Source: https://github.com/cobbyio/docs/blob/main/how-to/developers/migrate-from-cobby-v1-to-v2.md Sequence of Magento 2 CLI commands to upgrade, compile dependency injection, and clean the cache after installing a new extension. ```bash php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento cache:clean ``` -------------------------------- ### Install Extension for Magento 2 (Composer) Source: https://github.com/cobbyio/docs/blob/main/how-to/developers/handle-custom-product-types.md Installation steps for a custom product type extension in Magento 2 using Composer. Includes adding the package, upgrading setup, and clearing cache. ```bash composer require your-vendor/custom-product-type-extension php bin/magento setup:upgrade php bin/magento cache:clean ``` -------------------------------- ### Docusaurus Configuration Example Source: https://github.com/cobbyio/docs/blob/main/CLAUDE.md An example of key configurations within `docusaurus.config.js`, including multi-plugin setup for different documentation types, Google Tag Manager, and search integration. ```javascript const config = { // ... other configurations presets: [ [ 'classic', { docs: { // Default docs }, blog: { // Blog for release notes }, }, ], ], plugins: [ // Example of a multi-plugin setup '@docusaurus/plugin-content-docs', { id: 'tutorial', path: 'tutorials', route: '/tutorials', }, '@docusaurus/plugin-content-docs', { id: 'howto', path: 'how-to', route: '/how-to', }, // ... other plugins ], themeConfig: { // ... theme configuration googleAnalytics: { trackingID: 'GTM-WWS8BHM', }, // ... search plugin configuration }, }; module.exports = config; ``` -------------------------------- ### Homepage Structure Example Source: https://github.com/cobbyio/docs/blob/main/CLAUDE.md A conceptual example of `src/pages/index.js` demonstrating a bilingual layout using `useDocusaurusContext` to detect the current locale and render content accordingly. ```javascript import React from 'react'; import Layout from '@theme/Layout'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import Cards from '../components/Cards'; // Assuming Cards component exists function Homepage() { const { i18n } = useDocusaurusContext(); const isGerman = i18n.currentLocale === 'de'; const featuredDocs = [ { title: 'Tutorials', icon: '📚', description: 'Step-by-step guides', ctaLink: '/tutorials' }, { title: 'How-Tos', icon: '💡', description: 'Problem-solving guides', ctaLink: '/how-to' }, { title: 'Reference', icon: '📖', description: 'API and feature documentation', ctaLink: '/reference' }, { title: 'Explanations', icon: '🤔', description: 'Conceptual overviews', ctaLink: '/explanation' }, ]; return (

{isGerman ? 'Cobby Dokumentation' : 'Cobby Documentation'}

{featuredDocs.map((doc, index) => ( ))}
); } export default Homepage; ``` -------------------------------- ### Install Extension for Magento 1 (Manual) Source: https://github.com/cobbyio/docs/blob/main/how-to/developers/handle-custom-product-types.md Manual installation steps for a custom product type extension in Magento 1. Involves copying files to specific directories and clearing the cache. ```bash 1. Copy the extension to app/code/local/ or app/code/community/ 2. Copy the XML file to app/etc/modules/ 3. Clear cache: rm -rf var/cache/* ``` -------------------------------- ### Tailwind CSS Configuration Example Source: https://github.com/cobbyio/docs/blob/main/CLAUDE.md An example of `tailwind.config.js` showing the disabling of preflight and the definition of a custom color palette for the cobby theme. ```javascript /** @type {import('tailwindcss').Config} */ module.exports = { content: ['./src/**/*.{js,jsx,ts,tsx,md}'], theme: { extend: { colors: { primary: '#0064a0', // dark blue 'primary-light': '#54a0d0', 'primary-lighter': '#a0d0f0', 'primary-lightest': '#e0f0fc', secondary: '#00aaf0', // light blue }, }, }, corePlugins: { preflight: false, }, }; ``` -------------------------------- ### Install Dependencies Source: https://github.com/cobbyio/docs/blob/main/CLAUDE.md Installs all the necessary packages for the Docusaurus project. This command is essential before running any development or build tasks. ```bash npm install ``` -------------------------------- ### Clone Example Extension for Magento 2 Source: https://github.com/cobbyio/docs/blob/main/how-to/developers/handle-custom-product-types.md Clones the example extension from GitHub for Magento 2 to handle custom product types with cobby. No specific dependencies, output is the cloned repository. ```bash git clone https://github.com/mash2/cobby-magento2-custom-product-type ``` -------------------------------- ### Clone Example Extension for Magento 1 Source: https://github.com/cobbyio/docs/blob/main/how-to/developers/handle-custom-product-types.md Clones the example extension from GitHub for Magento 1 to handle custom product types with cobby. No specific dependencies, output is the cloned repository. ```bash git clone https://github.com/mash2/cobby-magento1-custom-product-type ``` -------------------------------- ### Start Development Server Source: https://github.com/cobbyio/docs/blob/main/CLAUDE.md Starts the Docusaurus development server, which typically runs on localhost:3000. It enables hot-reloading for faster development cycles. ```bash npm run start ``` -------------------------------- ### Custom CSS Example Source: https://github.com/cobbyio/docs/blob/main/CLAUDE.md An example of `src/css/custom.css` demonstrating the use of Tailwind directives and custom CSS classes for styling specific components like hero sections and breadcrumbs. ```css @tailwind base; @tailwind components; @tailwind utilities; /* Infima CSS variable overrides */ :root { --ifm-color-primary: #0064a0; } /* Custom component classes */ .custom-hero { @apply text-4xl font-bold; } .breadcrumbs { @apply text-sm text-gray-600; } ``` -------------------------------- ### Excel Formula: IMAGE.CREATE Basic Usage Source: https://github.com/cobbyio/docs/blob/main/how-to/images/create-images.md This example demonstrates the basic usage of the IMAGE.CREATE function, requiring only the file path and label for the image. It's a starting point for adding images with minimal configuration. ```Excel Formula =IMAGE.CREATE("C:\cobby_logo.png";"The cobby logo") ``` -------------------------------- ### Custom Header Component Example Source: https://github.com/cobbyio/docs/blob/main/CLAUDE.md A conceptual example of the `Header.js` component, illustrating how it might be used for page headers or hero sections with responsive typography. ```javascript import React from 'react'; function Header({ title, subtitle }) { return (

{title}

{subtitle &&

{subtitle}

}
); } export default Header; ``` -------------------------------- ### Local Search Configuration Example Source: https://github.com/cobbyio/docs/blob/main/CLAUDE.md Configuration for the `@easyops-cn/docusaurus-search-local` plugin, specifying the number of results and context length. ```javascript themeConfig: { // ... other theme config algolia: { // This is for Algolia, but the local search plugin uses similar config concepts // The actual local search plugin config is usually in docusaurus.config.js directly // Example for local search plugin: // docsRouteBasePath: '/', // searchBarPlaceholder: 'Search docs', // searchableScrollbar: false, // searchResultLimits: 10, // searchResultContextLines: 50, }, // ... other theme config } ``` -------------------------------- ### Custom Cards Component Example Source: https://github.com/cobbyio/docs/blob/main/CLAUDE.md A conceptual example of the `Cards.js` component, showing its structure for displaying content cards with titles, icons, links, and call-to-action buttons. ```javascript import React from 'react'; import Link from '@docusaurus/Link'; function Card({ title, icon, description, ctaLink, ctaText }) { return (
{icon &&
{icon}
}

{title}

{description &&

{description}

} {ctaLink && ( {ctaText || 'Learn More'} )}
); } export default Card; ``` -------------------------------- ### Spreadsheet: SEO Meta Title Formula Example Source: https://github.com/cobbyio/docs/blob/main/how-to/excel-formulas/concatenate-attributes.md Provides an example formula for building effective SEO meta titles by combining Brand, Model, Color, Category, and store name, adhering to best practices. ```excel =CONCATENATE([@Brand];" ";[@Model];" ";[@Color];" - ";[@Category];" | Your Store") ``` -------------------------------- ### Excel Formula Examples for Product Pricing Source: https://github.com/cobbyio/docs/blob/main/how-to/excel-formulas/use-formulas-in-cobby.md A collection of common Excel formulas for product data management in cobby. These examples cover percentage discounts, fixed amount deductions, margin-based pricing, conditional pricing based on stock, and copying data from other columns. ```excel =ROUND([@Price]*0.85;2) ``` ```excel =[@Price]-10 ``` ```excel =ROUND([@Cost]*1.4;2) ``` ```excel =IF([@Stock]>100;[@Price]*0.9;[@Price]) ``` ```excel =[@[Short Description]] ``` -------------------------------- ### Environment Variable Configuration for Base URL Source: https://context7.com/cobbyio/docs/llms.txt This Bash snippet demonstrates how to configure environment variables for the project, specifically the `BASE_URL`. The `.env.sample` file serves as a template, showing how to set the `BASE_URL` for local development (e.g., `http://localhost:3000`) and for production deployments (e.g., `https://help.cobby.io`). This ensures correct routing and resource loading in different environments. ```bash # .env.sample - Environment variables template BASE_URL=http://localhost:3000 # For production, set to your production domain: # BASE_URL=https://help.cobby.io ``` -------------------------------- ### Excel MID Formula Example Source: https://github.com/cobbyio/docs/blob/main/reference/formulas/common-formulas.md The MID formula extracts a specified number of characters from a text string, starting at a specified position. ```Excel Formula =MID("Hello", 2, 3) ``` -------------------------------- ### Excel FIND Formula Example Source: https://github.com/cobbyio/docs/blob/main/reference/formulas/common-formulas.md The FIND formula locates one text string within another (case-sensitive) and returns the starting position number. ```Excel Formula =FIND("ll", "Hello") ``` -------------------------------- ### Change Image Filenames with IMAGES.REPLACEFILENAMES Source: https://github.com/cobbyio/docs/blob/main/how-to/images/image-formula-examples.md Replaces image filenames with SEO-friendly names, such as using the product name instead of the SKU, via the IMAGES.REPLACEFILENAMES formula. This formula is applied in a helper column setup. It handles multiple images by automatically adding numbers and converting spaces to underscores. ```excel =IMAGES.REPLACEFILENAMES([@[Original Images]];[@[Product Name]]) ``` -------------------------------- ### Serve Built Site Locally Source: https://github.com/cobbyio/docs/blob/main/CLAUDE.md Serves the static files generated by the `npm run build` command. This is useful for testing the production build before deployment. ```bash npm run serve ``` -------------------------------- ### Build Production Site Source: https://github.com/cobbyio/docs/blob/main/CLAUDE.md Generates a production-ready static version of the documentation website. The output is usually placed in a `build` directory. ```bash npm run build ``` -------------------------------- ### Spreadsheet: CONCATENATE Example Source: https://github.com/cobbyio/docs/blob/main/how-to/excel-formulas/concatenate-attributes.md A simple example illustrating how to use the CONCATENATE function to combine three text strings, including a space, to form a readable phrase. ```excel =CONCATENATE("Hello"; " "; "World") ``` -------------------------------- ### Create Product Templates with Auto-Populating Formulas in cobby Source: https://github.com/cobbyio/docs/blob/main/how-to/product-management/manage-presets.md Instructions for creating product templates using presets by saving formulas in the first row. These formulas automatically populate data when creating new products. Ensure mandatory Magento fields remain visible during setup. ```excel In the URL Key column's first row, enter: `=LOWER(SUBSTITUTE(B2," ","-"))` ``` -------------------------------- ### Install cobby 2.0 Extension (Magento 2) Source: https://github.com/cobbyio/docs/blob/main/how-to/developers/migrate-from-cobby-v1-to-v2.md Composer command to add the cobby 2.0 Magento 2 extension repository and install the package. ```bash composer require cobby-io/cobby-connector-magento2 ``` -------------------------------- ### Docusaurus Multi-Plugin Configuration Source: https://context7.com/cobbyio/docs/llms.txt This JavaScript configuration file sets up a Docusaurus project with multiple content plugins. It defines distinct documentation sections (tutorials, how-to, reference, explanation) each with its own routing and sidebar. Dependencies include 'dotenv' for environment variables and '@docusaurus/plugin-google-tag-manager' for analytics. ```javascript // docusaurus.config.js - Multi-plugin documentation architecture require("dotenv").config(); const { themes } = require('prism-react-renderer'); const config = { title: "cobby Help Docs", url: process.env.BASE_URL, baseUrl: "/", onBrokenLinks: "throw", favicon: "img/favicon.ico", organizationName: "cobby GmbH & Co. KG", projectName: "helpcenter", plugins: [ // Google Tag Manager for analytics [ "@docusaurus/plugin-google-tag-manager", { containerId: "GTM-WWS8BHM", }, ], // Tutorials section [ "content-docs", { id: "tutorials", path: "tutorials", routeBasePath: "tutorials", sidebarPath: require.resolve("./sidebars.js"), editUrl: "https://github.com/cobbyio/docs/tree/main/", }, ], // How-To Guides section [ "content-docs", { id: "how-to", path: "how-to", routeBasePath: "how-to", sidebarPath: require.resolve("./sidebars.js"), editUrl: "https://github.com/cobbyio/docs/tree/main/", }, ], // Reference section [ "content-docs", { id: "reference", path: "reference", routeBasePath: "reference", sidebarPath: require.resolve("./sidebars.js"), editUrl: "https://github.com/cobbyio/docs/tree/main/", }, ], // Explanation section [ "content-docs", { id: "explanation", path: "explanation", routeBasePath: "explanation", sidebarPath: require.resolve("./sidebars.js"), editUrl: "https://github.com/cobbyio/docs/tree/main/", }, ], require("./plugins/tailwind-config"), ], presets: [ [ "classic", { docs: { sidebarPath: require.resolve("./sidebars.js"), editUrl: "https://github.com/cobbyio/docs/tree/main/", }, blog: { path: "release-notes", showReadingTime: true, blogSidebarCount: 10, blogTitle: "Release Notes", routeBasePath: "release-notes", postsPerPage: 10, }, theme: { customCss: require.resolve("./src/css/custom.css"), }, sitemap: { changefreq: 'weekly', priority: 0.5, ignorePatterns: ['/tags/**'], filename: 'sitemap.xml', }, }, ], ], // Local search integration themes: [ [ require.resolve("@easyops-cn/docusaurus-search-local"), { hashed: true, language: ["en"], indexBlog: true, indexPages: true, docsRouteBasePath: ["/", "/tutorials", "/how-to", "/reference", "/explanation"], blogRouteBasePath: "/release-notes", highlightSearchTermsOnTargetPage: true, searchResultLimits: 10, searchResultContextMaxLength: 50, }, ], ], themeConfig: { navbar: { logo: { alt: "Cobby Logo", src: "img/logo.svg", }, items: [ { to: "/tutorials/getting-started/first-steps", label: "Tutorials", position: "left" }, { to: "/how-to/product-management/import-data", label: "How-To Guides", position: "left" }, { to: "/reference", label: "Reference", position: "left" }, { to: "/explanation/architecture/how-cobby-works", label: "Explanation", position: "left" }, { to: "/release-notes", label: "Release Notes", position: "right" }, { to: "https://documenter.getpostman.com/view/26334176/2sAYBPoFPm", label: "Open API", position: "right", target: "_blank" }, ], }, footer: { style: "dark", links: [ { items: [ { label: "cobby", href: process.env.BASE_URL, }, ], }, ], copyright: `Copyright © ${new Date().getFullYear()} cobby GmbH & Co. KG`, }, prism: { theme: themes.github, darkTheme: themes.dracula, }, colorMode: { disableSwitch: true, // Light mode only }, }, }; module.exports = config; ``` -------------------------------- ### Dockerfile - Multi-Stage Build for Production Source: https://context7.com/cobbyio/docs/llms.txt A three-stage Dockerfile designed for production environments. It sets up a base Node.js environment, builds the application in a second stage, and serves the static build using Nginx in the final stage for optimization. ```dockerfile # Dockerfile - Three-stage Docker build for production # syntax=docker/dockerfile:1 # Stage 1: Base image with Node.js LTS FROM node:lts as base ENV FORCE_COLOR=0 RUN corepack enable WORKDIR /opt/docusaurus # Stage 2: Production build FROM base as prod WORKDIR /opt/docusaurus ARG BASE_URL ENV BASE_URL=${BASE_URL} COPY . /opt/docusaurus/ RUN npm ci RUN npm run build # Stage 3: Serve with nginx FROM nginx:alpine as serve COPY --from=prod /opt/docusaurus/build /usr/share/nginx/html COPY nginx.conf /etc/nginx/conf.d/default.conf EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] ``` -------------------------------- ### POST /cobby/import/products/start Source: https://github.com/cobbyio/docs/blob/main/reference/api/endpoints-and-events.md Initiates the product import process in Magento 2. This endpoint is available from Cobby version 1.41 onwards. ```APIDOC ## POST /cobby/import/products/start ### Description Initiates the product import process in Magento 2. This endpoint is available from Cobby version 1.41 onwards. ### Method POST ### Endpoint `/cobby/import/products/start` ### Parameters #### Query Parameters None #### Request Body * **import_type** (string) - Optional - Specifies the type of import to start (e.g., 'full', 'incremental'). Defaults to 'full' if not provided. ### Request Example ```json { "import_type": "incremental" } ``` ### Response #### Success Response (200) * **status** (string) - The status of the operation (e.g., 'success'). * **message** (string) - A message indicating that the import process has started. #### Response Example ```json { "status": "success", "message": "Product import process initiated." } ``` ``` -------------------------------- ### Image Creation from Dynamic Path Sources Source: https://github.com/cobbyio/docs/blob/main/how-to/images/image-formula-examples.md Constructs an image path by selecting between a local path or a URL path based on the 'Image Source' column, then appends the SKU. This allows for flexible image sourcing. ```excel =IMAGE.CREATE(IF([@[Image Source]]="Local";[@[Local Path]];[@[URL Path]])&[@SKU]&".jpg") ``` -------------------------------- ### Excel RANDBETWEEN Syntax and Example Source: https://github.com/cobbyio/docs/blob/main/how-to/excel-formulas/randomize-text.md Demonstrates the basic syntax of the RANDBETWEEN function in Excel, which generates a random integer between a specified lower and upper bound. The example shows how to generate a random number from 1 to 5. ```excel =RANDBETWEEN(lower_number; upper_number) ``` ```excel =RANDBETWEEN(1; 5) ``` -------------------------------- ### Test cobby API Endpoint Source: https://github.com/cobbyio/docs/blob/main/how-to/developers/migrate-from-cobby-v1-to-v2.md Example command using curl to test the availability and response of the cobby API endpoint for a given store. ```bash curl https://yourstore.com/cobby/api ``` -------------------------------- ### Example VBA Macro for Data Cleanup Source: https://github.com/cobbyio/docs/blob/main/how-to/excel-formulas/use-macros-with-cobby.md This snippet demonstrates a placeholder for a VBA macro intended for data cleanup tasks. It serves as a structural example and requires specific implementation for actual functionality. Macros for cleanup are ideal for tasks like removing empty rows. ```vba ' Remove all empty rows Sub RemoveEmptyRows() ' Macro code here End Sub ```