Bagisto Forum

    Bagisto

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

    How do you show ordered image in summary page without storing into database?

    General Discussion
    2
    6
    650
    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.
    • K
      Keerthi last edited by

      Hi,

      I have a small doubt, how do you show ordered image in summary page without storing it into database, not only in summary page but also in cart wishlist etc except orders page.

      1 Reply Last reply Reply Quote 0
      • R
        rahul last edited by

        Hello @Keerthi

        Order is place for product & product have their images so on the basis of product, we retrieve its image on cart, wishlist and summary page.

        Thanks

        1 Reply Last reply Reply Quote 0
        • K
          Keerthi last edited by

          Hi @rahul

          Can you please tell me or send me few lines of code to show images in ordered history page similarly like cart, wishlist and summary pages. Actually I have tried but image is not showing and also not showing correct image (Need to show this image path http://localhost/vayathi-Copy/cache/medium/product/22/P26nErnP4XSx0VX44No11jUMSGwkTdHizfHWek5A.png but it is showing this image path http://localhost/vayathi-Copy/vendor/webkul/ui/assets/images/product/meduim-product-placeholder.png) So, please tell me where is the wrong. Below is the code what actually I have used to show image in order history page, thanks in advance.

               @inject ('productImageHelper', 'Webkul\Product\Helpers\ProductImage')
                           @foreach ($orders as $item)
                           <?php
                          $product = $item->product;
          
                          $productBaseImage = $productImageHelper->getProductBaseImage($product);
                      ?>
                                          <img src="{{ $productBaseImage['medium_image_url'] }}" width="100px" height="100px"/>
                                         {{ $item['name'] }}
                                          {{ $item->quantity }}
                      @endforeach
          
          1 Reply Last reply Reply Quote 0
          • R
            rahul last edited by

            Hi @Keerthi

            I check your code & it is perfect. I used the same code and got perfect result. ( https://prnt.sc/oy8em7 ).

            The default images will be show only if -

            Your product do not have any images.
            Your image is not cached.

            So, check this two & still issue persist, then write here.

            Thanks

            1 Reply Last reply Reply Quote 0
            • K
              Keerthi last edited by Keerthi

              Hi @rahul

              I am getting product image in the specific product view page but not in the main orders page. Please find below are the screenshots for two pages images and difference between two images.

              Screenshot (116).png

              screencapture-localhost-bagisto-public-customer-account-orders-view-1-2019-08-28-12_08_27.png

              1 Reply Last reply Reply Quote 0
              • R
                rahul last edited by

                Hi @Keerthi

                Kindly check your product data on both the pages & make sure that your are getting same data otherwise you need to change it.

                Thanks

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