Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    issues with images and add to cart

    General Discussion
    2
    4
    224
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      samparker last edited by

      I have been working on to migrate a website from magento2 to bagisto. Things are good but facing an issue with the image and adding products to cart. The images on the product page keeps showing the shimmer image and console is showing 404 for the images. Images loaded here are via cache and small , large etc.
      Another issue is with the add to cart process and add to cart button is disabled, we have the required inventory and all but still is saleable is returning false.
      Any guidance to fix these would be a great help.

      S 1 Reply Last reply Reply Quote 0
      • S
        samparker @samparker last edited by

        Already did indexing using the artisan indexer:index command but still issue persists.

        1 Reply Last reply Reply Quote 0
        • 0
          01aviral-webkul last edited by 01aviral-webkul

          @samparker said in issues with images and add to cart:

          Already did indexing using the artisan indexer:index command but still issue persists.

          Hi,

          Both issues are generally related to incomplete product migration data rather than indexing alone.

          1. Product Images Showing Shimmer / 404 Errors

          Please verify the following:

          • Check whether the original product images exist in the storage/app/public/product directory.

          • Ensure image paths stored in the product_images table are correct and match the actual file locations.

          • Run the storage symlink command:

            php artisan storage:link
            
          • Clear cache and regenerate indexes:

            php artisan optimize:clear
            php artisan indexer:index
            
          • Open the image URL that returns 404 and verify whether the source image actually exists.

          • If images were migrated directly from Magento, confirm they were copied to Bagisto's expected product image storage structure.

          2. Add to Cart Disabled (isSaleable() Returns False)

          Please check:

          • Product status is enabled.
          • Product is assigned to the current channel.
          • Product is assigned to the current locale.
          • Product has a valid price.
          • Inventory source quantity is greater than zero.
          • The inventory source is assigned to the channel.
          • Product is not marked as out of stock.
          • Parent-child associations are correct for configurable, grouped, or bundle products.

          For debugging, inspect the result of:

          $product->haveSufficientQuantity(1);
          $product->isSaleable();
          $product->totalQuantity();
          

          Also verify inventory records exist in:

          product_inventories
          channel_inventories
          

          Additional Check

          Since the data was migrated from Magento 2, compare a newly created Bagisto product against a migrated product. If a newly created product works correctly while migrated products do not, the issue is likely caused by missing channel, inventory, image, or attribute mapping data during migration.

          If you can share the Bagisto version and the exact 404 image URL along with the isSaleable() debug output, we can help identify the root cause more precisely.

          Thanks
          Aviral
          Team Bagisto

          S 1 Reply Last reply Reply Quote 0
          • S
            samparker @01aviral-webkul last edited by

            @01aviral-webkul Thanks alot, these points helped to fix the issue.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post