Group Details Private

administrators

Member List

  • RE: Unable to Update Configuration Settings – 403 Forbidden in Bagisto 2.4

    Hello, @gkdev

    Greetings!

    As you confirmed, you were previously working on the master branch, which contains the newer Bagisto 2.5 version, and then switched to the 2.4 branch.

    Please note that once Bagisto has been installed, you cannot move back to an older version simply by switching branches. If you need to use the older branch/code, you will need to reinstall Bagisto using the required version.

    If your project contains any production data, we strongly recommend that you do not downgrade or switch to an older version, as the database structure of a newer Bagisto version may not be compatible with an older version.

    If you do not have any production data and want to start with a fresh Bagisto 2.4 installation, you can clone the Bagisto 2.4 branch and install it using:

    composer install 
    php artisan bagisto:install
    

    Note: If you have any important data, customizations, or changes, please make sure to take a complete backup before reinstalling.

    Also, please note that the database of a newer Bagisto version cannot simply be used with an older Bagisto version, as the database structure and migrations may differ between versions.

    Regarding the 403 Forbidden Error
    The 403 Forbidden error is generally related to server configuration or file permissions. Please ensure that the web-server user has the required read/write permissions for the Bagisto application directories.

    For a standard Linux server using www-data as the web-server user, you can use the following commands from the Bagisto project directory:

    sudo chown -R www-data:www-data storage bootstrap/cache 
    sudo chmod -R 775 storage bootstrap/cache
    

    If your web server uses a different user, such as nginx or nobody, replace www-data with the appropriate web-server user.

    You can check the web-server user based on your server configuration/processes before applying the ownership command.

    If the issue persists, you can also ensure that the Bagisto project directories are accessible by the web server:

    sudo chmod -R 755 /path/to/bagisto 
    sudo chmod -R 775 /path/to/bagisto/storage 
    sudo chmod -R 775 /path/to/bagisto/bootstrap/cache
    

    Please replace /path/to/bagisto with your actual Bagisto project path.

    After updating the permissions, clear the application cache:

    php artisan optimize:clear
    

    Important: We recommend avoiding chmod -R 777 on the Bagisto project, as it provides unnecessarily broad permissions and is not recommended for a production server.

    Thank you.
    Aviral
    Team Bagisto

    posted in Bug Report
  • RE: Unable to Update Configuration Settings – 403 Forbidden in Bagisto 2.4

    Hi @gkdev ,

    Thanks for the clear details. A 403 Forbidden while saving Configuration is
    usually caused by one of the three things below. Please check them in this order.

    1. Server security rule (the most common cause)
      Most servers run a security firewall (like ModSecurity / WAF). It can block a
      "Save" when one of the setting fields contains characters it treats as unsafe -
      for example < > quotes, a URL, or code-like text. This is why some Configuration
      pages save fine and others give a 403.
    • Ask your hosting/server team to open the web server error log (Apache or
      Nginx) at the exact time you got the 403.
    • If a security rule is blocking it, ask them to allow/whitelist your admin
      save URL: /admin/configuration.

    Tip to confirm this: a plain white "403 Forbidden" page means the server blocked
    it. A Bagisto permission problem instead shows the styled Bagisto "Unauthorized"
    screen, and a CSRF problem shows a "419" page - so those two are likely not your
    issue here.

    1. Admin role permissions
      After moving to 2.4, an existing role can be left without full rights.
    • Go to Settings > Users > Roles, open your role, set Access Control to "All",
      and save it.
    • Log out, log back in, and try saving again.
    1. Old cache left over from the update
      After any version update, run the migrations and clear all caches:
      php artisan migrate
      php artisan optimize:clear
      php artisan route:clear
      php artisan config:clear
      php artisan view:clear

    Recommended way to update master -> 2.4 in an existing install:

    • Take a full backup first (both files and database).
    • Pull the 2.4 code.
    • Run: composer install
    • Run the migrate + cache-clear commands listed above.
    • Rebuild the admin assets if needed:
      cd packages/Webkul/Admin
      npm install && npm run build

    If you can share that one error-log line from a failed save, we can tell you
    exactly which rule is blocking it.

    Thanks.
    Aviral
    Bagisto Team

    posted in Bug Report
  • RE: Buy One Get One Free Functionality Not Working

    @rahil This type of functionality can be customized, but as of now, Bagisto does not automatically add a free product to the cart based on the purchase of another product.

    For example, if the customer purchases Product X, we can customize the system so that Product Y is automatically added to the cart as a free product.

    This would require custom development to implement the required promotion logic.

    Thanks

    posted in Bug Report
  • RE: Buy One Get One Free Functionality Not Working

    Hi,

    The Buy X Get Y Free rule is working as configured. The issue is with the Maximum Eligible Quantity value in the promotion configuration.

    If the offer requires 2 products to participate in the Buy X Get Y deal, the Maximum Eligible Quantity must be set to a value greater than 1. Currently, it is set to 1, which means only one unit is eligible for the promotion.

    How to configure Buy X Get Y Free in Bagisto
    Go to Admin → Marketing → Promotions → Cart Rules.
    Create a new cart rule or edit the existing Buy X Get Y rule.
    Select Action Type → Buy X Get Y Free.
    Configure the required values:
    Free Quantity (Y): Enter the number of free items the customer should receive.
    Buy X Quantity: Enter the number of items the customer needs to purchase.
    Maximum Eligible Quantity: Set this according to how many units should participate in the promotion.
    For example,
    If the customer needs to purchase 1 product to qualify for the offer, they need to add 2 products to the cart—one paid product and one free product—and then apply the coupon.
    For example, for a Buy 1 Get 1 Free promotion:
    Buy X Quantity: 1
    Free Quantity (Y): 1
    Maximum Eligible Quantity: 2

    The customer should then add 2 eligible products to the cart and apply the coupon. The promotion will make 1 product free while the customer pays for the other product.

    In the provided configuration, Maximum Eligible Quantity is currently set to 1. Since the promotion requires 2 products, please update this value to 2 (or higher).

    The description below the field also indicates its purpose: “Caps how many units of this item participate in the Buy X Get Y deal.”

    So, for a Buy 1 Get 1 Free promotion, the recommended configuration is:

    Buy X Quantity = 1 | Free Quantity (Y) = 1 | Maximum Eligible Quantity = 2

    After updating this value, please save the rule and test the promotion again.

    Thnaks

    posted in Bug Report
  • RE: Category Tree

    Hello Justin,
    Greetings!

    Support for displaying third-level child categories on the frontend/API has been improved in the latest versions of Bagisto.

    Kindly update to the latest version of Bagisto, as it includes the necessary changes for nested category support.

    If you still encounter the same issue after upgrading, please let us know your Bagisto version and the API endpoint you are using. We'll be happy to assist you further.

    Thank you!

    Kartikey Dubey
    Team Bagisto

    posted in Bug Report
  • RE: Razorpay gateway module

    Hello,
    Greetings!

    The Razorpay SDK cannot be used directly with Bagisto without additional customization.

    Razorpay has now been integrated into the latest version of Bagisto. You can clone the latest Bagisto repository and follow our installation guide to get started:

    https://devdocs.bagisto.com/getting-started/installation

    You can also refer to our Razorpay configuration guide for detailed setup instructions:

    https://docs.bagisto.com/configure/payment-methods.html#razorpay

    If you face any issues during the installation or configuration process, please let us know. We'll be happy to assist you.

    Thank you!

    Kartikey Dubey
    Team Bagisto

    posted in Knowledge Base
  • RE: Installing In Hostiger

    Hello,
    Greetings!

    Kindly follow the installation guide provided in our official documentation:

    https://devdocs.bagisto.com/getting-started/installation

    If you encounter any issues while following the installation steps, please let us know by sharing the error details or screenshots. We will be happy to assist you in resolving them.

    Thank you!

    Kartikey Dubey
    Team Bagisto

    posted in Installing Bagisto
  • RE: Seller register form "CSRF Token Mismatch"

    Hello Gwenaelle,

    Greetings!

    Thank you for reaching out and for sharing your findings.

    The @csrf token is already included in our shop form component located at:

    packages/Webkul/Shop/src/Resources/views/components/form/index.blade.php

    Therefore, there is no need to add @csrf manually on pages that use the <x-shop::form> component.

    Could you please clear your browser cache and try again? If you still encounter the same 419 (CSRF Token Mismatch) error, kindly let us know. We'll investigate it further.

    Thank you as well for your suggestion regarding the seller approval documentation. We appreciate your feedback and will consider improving the documentation to make this process easier to find.

    Regards,
    Kartikey Dubey
    Team Bagisto

    posted in Bug Report
  • RE: Marketplace - French postcode not recognized as valid

    Hello Gwenaelle,
    Greetings!

    Thank you for reaching out and for sharing your findings.

    We were able to identify this issue, and it has already been fixed in the latest version of the Marketplace package (v2.4.6).

    If you continue to experience any problems after changes in database, please let us know. We'll be happy to assist you further.

    Regards,
    Kartikey Dubey
    Team Bagisto

    posted in Bug Report
  • RE: We want to add UTM to track sales

    Hello Gaurav,
    Greetings!

    Thank you for reaching out.

    Yes, UTM parameters can be implemented in Bagisto to track affiliate clicks and conversions. Since UTM parameters (such as utm_source, utm_medium, utm_campaign, etc.) are used for tracking marketing sources, they can be captured when a customer lands on the website and associated with their complete purchasing journey.

    Proposed Implementation Flow

    1. Capture UTM Parameters

    Create a middleware or use an event listener to capture UTM parameters from incoming URLs.

    For example:

    https://yourstore.com/product/abc?utm_source=affiliate1&utm_medium=partner&utm_campaign=sale

    The captured UTM values can then be stored in the customer session or browser cookies.

    2. Maintain Tracking Throughout the Customer Journey

    Ensure that the stored UTM data remains available while the customer:

    • Browses products
    • Adds items to the cart
    • Proceeds to checkout

    This ensures the original affiliate or campaign information is retained until the order is placed.

    3. Save UTM Details with Orders

    Add custom fields to the orders table and store the captured UTM information during the order placement process.

    This will allow you to identify which affiliate, campaign, or marketing source generated the successful sale.

    4. Generate Affiliate Conversion Reports

    Once UTM data is stored with orders, custom reports can be created to analyze:

    • Affiliate performance
    • Campaign effectiveness
    • Conversion and sales data

    Please note that Bagisto v2.3.6 does not provide built-in support for affiliate UTM tracking. Therefore, this functionality will require a custom implementation based on your affiliate tracking and reporting requirements.

    Thank You
    Kartikey Dubey
    Team Bagisto

    posted in General Discussion