Display visual swtach images

18 views Asked by At

0

I created a visual swatch attribute from admin panel to adding 'brands' for products,In my Main/Store module i created brands.phtml file , and there is a Brands.php file inside Block folder, now problem is with getting image url or its name , i didnt know, i get the attribute values and the frontend label values , but i didnt how to get the images :( ,i searched on internet but i didnt get a useful answer, i tried many things but sometimes i get url image that contains pub/static/... url and as i know the path of images must be from media folder, can anyone help me with getting the full url of the images to display them , then i when user click on the image it will return the user to the products that under this brand , so i want to get url for each brand like this

<a href='link for all products that i chose this brand for them'><img src='image_source' /></a>
0

There are 0 answers