Skip to main content
added 52 characters in body
Source Link

In addition to the solution of Amit above, this is only for the category page. To change it on the homepage i did the following too:

Goto

app/design/frontend/{ThemeVendorname}/{Themename}/{ThemeVendorname}_ProductWidget/templates/product/widget/content/list.phtml

Somewere in line 173 you see this code:

<button data-mage-init='{"redirectUrl":{"url":"<?php /* @escapeNotVerified */ echo $block->getAddToCartUrl($_item) ?>"}}'
                 type="button"
                 title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
                 class="action tocart btn btn-default btn-cart">
                <span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span>
               </button>

Change this code with

<a href="<?php /* @escapeNotVerified */ echo $_item->getProductUrl() ?>" title="<?php echo __('View Product') ?>" class="btn btn-default"><?php echo __('View Product') ?></a>

Go to line 184 and see this code

<button data-post='<?php /* @escapeNotVerified */ echo $postData; ?>'
                 type="button"
                 title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
                 class="action tocart btn btn-default btn-cart">
                <span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span>
               </button>

And change also this code with

<a href="<?php /* @escapeNotVerified */ echo $_item->getProductUrl() ?>" title="<?php echo __('View Product') ?>" class="btn btn-default"><?php echo __('View Product') ?></a>

Maybe you have to style the generated URL with CSS. Hope it helped somebody else too!

In addition to the solution of Amit above, this is only for the category page. To change it on the homepage i did the following too:

Goto

app/design/frontend/{ThemeVendorname}/{Themename}/{ThemeVendorname}_ProductWidget/templates/product/widget/content/list.phtml

Somewere in line 173 you see this code:

<button data-mage-init='{"redirectUrl":{"url":"<?php /* @escapeNotVerified */ echo $block->getAddToCartUrl($_item) ?>"}}'
                 type="button"
                 title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
                 class="action tocart btn btn-default btn-cart">
                <span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span>
               </button>

Change this code with

<a href="<?php /* @escapeNotVerified */ echo $_item->getProductUrl() ?>" title="<?php echo __('View Product') ?>" class="btn btn-default"><?php echo __('View Product') ?></a>

Go to line 184 and see this code

<button data-post='<?php /* @escapeNotVerified */ echo $postData; ?>'
                 type="button"
                 title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
                 class="action tocart btn btn-default btn-cart">
                <span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span>
               </button>

And change also this code with

<a href="<?php /* @escapeNotVerified */ echo $_item->getProductUrl() ?>" title="<?php echo __('View Product') ?>" class="btn btn-default"><?php echo __('View Product') ?></a>

Hope it helped somebody else too!

In addition to the solution of Amit above, this is only for the category page. To change it on the homepage i did the following too:

Goto

app/design/frontend/{ThemeVendorname}/{Themename}/{ThemeVendorname}_ProductWidget/templates/product/widget/content/list.phtml

Somewere in line 173 you see this code:

<button data-mage-init='{"redirectUrl":{"url":"<?php /* @escapeNotVerified */ echo $block->getAddToCartUrl($_item) ?>"}}'
                 type="button"
                 title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
                 class="action tocart btn btn-default btn-cart">
                <span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span>
               </button>

Change this code with

<a href="<?php /* @escapeNotVerified */ echo $_item->getProductUrl() ?>" title="<?php echo __('View Product') ?>" class="btn btn-default"><?php echo __('View Product') ?></a>

Go to line 184 and see this code

<button data-post='<?php /* @escapeNotVerified */ echo $postData; ?>'
                 type="button"
                 title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
                 class="action tocart btn btn-default btn-cart">
                <span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span>
               </button>

And change also this code with

<a href="<?php /* @escapeNotVerified */ echo $_item->getProductUrl() ?>" title="<?php echo __('View Product') ?>" class="btn btn-default"><?php echo __('View Product') ?></a>

Maybe you have to style the generated URL with CSS. Hope it helped somebody else too!

Post Undeleted by Kees Janssen
Post Deleted by Kees Janssen
Source Link

In addition to the solution of Amit above, this is only for the category page. To change it on the homepage i did the following too:

Goto

app/design/frontend/{ThemeVendorname}/{Themename}/{ThemeVendorname}_ProductWidget/templates/product/widget/content/list.phtml

Somewere in line 173 you see this code:

<button data-mage-init='{"redirectUrl":{"url":"<?php /* @escapeNotVerified */ echo $block->getAddToCartUrl($_item) ?>"}}'
                 type="button"
                 title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
                 class="action tocart btn btn-default btn-cart">
                <span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span>
               </button>

Change this code with

<a href="<?php /* @escapeNotVerified */ echo $_item->getProductUrl() ?>" title="<?php echo __('View Product') ?>" class="btn btn-default"><?php echo __('View Product') ?></a>

Go to line 184 and see this code

<button data-post='<?php /* @escapeNotVerified */ echo $postData; ?>'
                 type="button"
                 title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
                 class="action tocart btn btn-default btn-cart">
                <span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span>
               </button>

And change also this code with

<a href="<?php /* @escapeNotVerified */ echo $_item->getProductUrl() ?>" title="<?php echo __('View Product') ?>" class="btn btn-default"><?php echo __('View Product') ?></a>

Hope it helped somebody else too!