Merge branch 'master' into web-vital-v2

This commit is contained in:
devansh bawari 2021-08-06 14:36:42 +05:30
commit 6e3b51cd26
5 changed files with 36 additions and 11 deletions

View File

@ -28,12 +28,20 @@ This changelog consists of the bug & security fixes and new features being inclu
* #4901 [enhancement] - Configurable product addition issue.
* #4449 [enhancement] - Laravel 8 Support
* #4767 [enhancement] - PHP 8 Support.
* #4449 [enhancement] - Laravel 8 Support.
* #3834 [enhancement] - Ability to use multiple datagrids on single page.
* #3251 [enhancement] - Add orders list to the customers details view.
* #5046 [fixed] - Add to cart button is not working in compare page for default theme.
* #5045 [fixed] - Not getting product images where cache is exist.
* #5042 [fixed] - Update the alert message when edit and save customer address.
* #5033 [fixed] - Order status options after invoice generation on payment methods.
* #5029 [fixed] - Header menu content list layout need to fix.

View File

@ -8,16 +8,19 @@ use Intervention\Image\Filters\FilterInterface;
class Large implements FilterInterface
{
/**
* Apply filter.
*
* @param \Intervention\Image\Image $image
* @return \Intervention\Image\Image
*/
public function applyFilter(Image $image)
{
$width = core()->getConfigData('catalog.products.cache-large-image.width') ?? 480;
$height = core()->getConfigData('catalog.products.cache-large-image.height') ?? 480;
$width = core()->getConfigData('catalog.products.cache-large-image.width') != '' ? core()->getConfigData('catalog.products.cache-large-image.width') : 480;
$height = core()->getConfigData('catalog.products.cache-large-image.height') != '' ? core()->getConfigData('catalog.products.cache-large-image.height') : 480;
return $image->resize($width, $height, function ($constraint) {
$constraint->aspectRatio();
});
}
}
}

View File

@ -8,13 +8,16 @@ use Intervention\Image\Filters\FilterInterface;
class Medium implements FilterInterface
{
/**
* Apply filter.
*
* @param \Intervention\Image\Image $image
* @return \Intervention\Image\Image
*/
public function applyFilter(Image $image)
{
$width = core()->getConfigData('catalog.products.cache-medium-image.width') ?? 280;
$height = core()->getConfigData('catalog.products.cache-medium-image.height') ?? 280;
$width = core()->getConfigData('catalog.products.cache-medium-image.width') != '' ? core()->getConfigData('catalog.products.cache-medium-image.width') : 280;
$height = core()->getConfigData('catalog.products.cache-medium-image.height') != '' ? core()->getConfigData('catalog.products.cache-medium-image.height') : 280;
$image->resize($width, $height, function ($constraint) {
$constraint->aspectRatio();
@ -22,4 +25,4 @@ class Medium implements FilterInterface
return $image->resizeCanvas($width, $height, 'center', false, '#fff');
}
}
}

View File

@ -8,13 +8,16 @@ use Intervention\Image\Filters\FilterInterface;
class Small implements FilterInterface
{
/**
* Apply filter.
*
* @param \Intervention\Image\Image $image
* @return \Intervention\Image\Image
*/
public function applyFilter(Image $image)
{
$width = core()->getConfigData('catalog.products.cache-small-image.width') ?? 120;
$height = core()->getConfigData('catalog.products.cache-small-image.height') ?? 120;
$width = core()->getConfigData('catalog.products.cache-small-image.width') ? core()->getConfigData('catalog.products.cache-small-image.width') : 120;
$height = core()->getConfigData('catalog.products.cache-small-image.height') ? core()->getConfigData('catalog.products.cache-small-image.height') : 120;
$image->resize($width, $height, function ($constraint) {
$constraint->aspectRatio();
@ -22,4 +25,4 @@ class Small implements FilterInterface
return $image->resizeCanvas($width, $height, 'center', false, '#fff');
}
}
}

View File

@ -68,7 +68,15 @@
@case('addToCartHtml')
<div class="action">
<div v-html="product.addToCartHtml"></div>
<form :action="`${baseUrl}/checkout/cart/add/${product.product_id}`" method="POST">
@csrf
<input type="hidden" name="product_id" :value="product.product_id">
<input type="hidden" name="quantity" value="1">
<div v-html="product.addToCartHtml"></div>
</form>
<span class="icon white-cross-sm-icon remove-product" @click="removeProductCompare(product.id)"></span>
</div>