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!
Solved! Go to Solution.
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>
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.
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?
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.
<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. Thank you so much for your help so far.
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>
Thank you so much for your patience! You've helped a lot.