cancel
Showing results for 
Search instead for 
Did you mean: 

turning the price tags into links

SOLVED

turning the price tags into links

I'm trying to change the price tags in this store http://millennialmedical.com/shop so that when you click on the red price tag, you will be redirected into the product page. Right now, the price tags are not active at all. I imagine it wouldn't be too hard. If you know how to do it, the help would be much appreciated. Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions

Re: turning the price tags into links

Hello,

 

You try:

<div class="span3">
     <div class="price-rating">

           <a href="<?php echo $_product->getProductUrl() ?>">
               <?php echo $this->getPriceHtml($_product, true) ?>

          </a>
           <?php if($_product->getRatingSummary()): ?>
           <?php echo $this->getReviewsSummaryHtml($_product) ?>
           <?php endif; ?>
     </div>

</div>

Problem solved? Click Accept as Solution!

View solution in original post

6 REPLIES 6

Re: turning the price tags into links

Hello Nothon,

 

You find your template: catalog/product/list.phtml

You add the code: <?php echo $_product->getProductUrl() ?> => this code is the link to product view page.

Problem solved? Click Accept as Solution!

Re: turning the price tags into links

I'm not sure where to search for that template. Do I get there from the admin panel on Magento, or through the files where everything is stored in my website folder on my server?

Re: turning the price tags into links

Hello Nothon,

 

You should find in your template:

app/design/frontend/default/ma_elecstore/template/catalog/product/list.phtml

You find the price tag: <?php echo $this->getPriceHtml($_product, true) ?>. And, create link for price tag and add href="<?php echo $_product->getProductUrl() ?>".

 

Note: I recommend that you should test on your local computer source code before putting it in your live site.

 

Problem solved? Click Accept as Solution!

Re: turning the price tags into links

<div class="span3">
     <div class="price-rating">
           <?php echo $this->getPriceHtml($_product, true) ?>
           <a href="<?php echo $_product->getProductUrl() ?>"></a>
           <?php if($_product->getRatingSummary()): ?>
           <?php echo $this->getReviewsSummaryHtml($_product) ?>
           <?php endif; ?>
     </div>

</div>

 

So I tried adding the bolded code right here, but it did not do anything. I'm sorry you'll have to explain it in even simpler terms. Smiley Happy Thank you so much for your help so far.

Re: turning the price tags into links

Hello,

 

You try:

<div class="span3">
     <div class="price-rating">

           <a href="<?php echo $_product->getProductUrl() ?>">
               <?php echo $this->getPriceHtml($_product, true) ?>

          </a>
           <?php if($_product->getRatingSummary()): ?>
           <?php echo $this->getReviewsSummaryHtml($_product) ?>
           <?php endif; ?>
     </div>

</div>

Problem solved? Click Accept as Solution!

Re: turning the price tags into links

Thank you so much for your patience! You've helped a lot.