Magento Forum

   
Hyperlink in product-listing doesn’t work
 
tease
Sr. Member
 
Total Posts:  115
Joined:  2010-10-06
 

Hello everybody,

I have a problem with a part of my product listing. I wanted to ad the note “inkl. MwSt. | DE versandkostenfrei” (which is german and means something like “including taxes") below the display of the product price. (See attached screenshots)

Therefore I edited the file app/design/frontend/default/theme/template/catalog/product/price.phtml like this: (please note that I couldn’t display the whole code, because this forum only allows a certain amount of characters)

.....
            
<?php if ($_taxHelper->displayBothPrices()): ?>
                
<class="special-price">
                    <
span class="price-label"><?php echo $this->__('Special Price:'?></span>
                    <
span class="price-excluding-tax">
                        <
span class="label"><?php echo $_taxHelper->__('Excl. Tax:'?></span>
                        <
span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
                            
<?php echo $_coreHelper->currency($_finalPrice+$_weeeTaxAmount,true,false?>
                        
</span>
    <!
�Mwstf�r Sonderpreise eingef�gt Start�>
<
span id=�product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>�>
<
span><br /><a href=\"http://www.schenkeria.de/lieferung\">inklMwSt. & <br />Versandkosten in DEU</a>
</
span>
<!
�Mwst.  Sonderpreise eingef�gt Ende�>
                    </
span>
                <
span class="price-including-tax">
                    <
span class="label"><?php echo $_taxHelper->__('Incl. Tax:'?></span>
                    <
span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
                        
<?php echo $_coreHelper->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false?>
                    
</span>
                </
span>
                </
p>
            
<?php else: ?>
            
<class="special-price">
                <
span class="price-label"><?php echo $this->__('Special Price:'?></span>
                <
span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
                    
<?php echo $_coreHelper->currency($_finalPrice+$_weeeTaxAmount,true,false?>
                
</span>
    <!
�Mwstf�r Sonderpreise eingef�gt Start�>
<
span id=�product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>�>
<
span><br /><a href=\"http://www.schenkeria.de/lieferung\">inklMwSt. & <br />Versandkosten in DEU</a>
</
span>
<!
�Mwst.  Sonderpreise eingef�gt Ende�>
            </
p>
            
<?php endif; ?>

            
<class="special-price">
                <
span class="price-label"><?php echo $this->__('Special Price:'?></span>
                <
span class="price-excluding-tax">
                    <
span class="label"><?php echo $_taxHelper->__('Excl. Tax:'?></span>
                    <
span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
                        
<?php echo $_coreHelper->currency($_finalPrice+$_weeeTaxAmount,true,false?>
                    
</span>
    <!
�Mwstf�r Sonderpreise eingef�gt Start�>
<
span id=�product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>�>
<
span><br /><a href=\"http://www.schenkeria.de/lieferung\">inklMwSt. & <br />Versandkosten in DEU</a>
</
span>
<!
�Mwst.  Sonderpreise eingef�gt Ende�>
            
    
<
span id=�product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>�>
<
span><br /><a href=\"http://www.schenkeria.de/lieferung/">inklMwSt. | DE versandkostenfrei</a>
</
span>

<!
�dieser Teil ist f�r die Sonderpreise Listenansicht zust�ndig�>...

The link for the regular price is working exactly the way I want it to work. It should link to the CMS site called “/lieferung”.

But now comes the problem:
The link I added to the special-price isn’t workin, which means that it won’t link to “www.mysite.de/lieferung” but instead it links to “http://www.mysite.de/&#x22;http://www.mysite.de/lieferung/&#x22;”! And I don’t know where Magento takes this (incorrect) information from.

Do you see any mistakes in the links I put into the code?

Any help is greatly appreciated!

Image Attachments
Versandkosten-url-richtig.pngVersandkosten-url-falsch.png
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top