I installed a 3rd party extension on my webstore. When customer views the orders, the system shows only a plain version without giving a hyperlink to allow the user to review the item purchased.

Anyone knows the coding to add a hyperlink on each item?

The path is in the


Full code for the page is:

$format = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM);
<div class="my-account" style="padding:0">
    <h1 class="dashboard_leftside_heading"><?php echo $this->__('Upcoming Trip');?></h1>
    <div id="upcoming_div" class="main_content">
        <?php  $upcoming_value = $this->upcomingTrip();        
        $cancelRequestconfig = Mage::getStoreConfig ( 'airhotels/custom_group/order_cancel_request' );
        <div style="clear:both;"></div>
        <div class="property_history_responsivetable">
            <table cellspacing="2" cellpadding="2" id="property_trip_table"><!-- property_property -->
                        <th width="10%"><?php echo $this->__('S.No'); ?></th>
                        <th width="15%"><?php echo $this->__('Image'); ?></th>
                        <th width="25%"><?php echo $this->__('Experience Name'); ?></th>
                        <th width="15%"><?php echo $this->__('Start On'); ?></th>
                        <th width="15%"><?php echo $this->__('End On'); ?></th>
                        <?php if($cancelRequestconfig == 1){?>
                        <th width="24%"><?php echo $this->__('Action'); ?></th>
                        <?php } ?>
                $serialNumber = 1;
                $tempValue = 0;
                for ($j = 0; $j < count($upcoming_value[0]); $j++) {
                    $propertyCollection = Mage::getModel('airhotels/property')->getpropertycollection()
                                            array('attribute' => 'entity_id', 'eq' => $upcoming_value[0][$j])));                            
                    foreach ($propertyCollection as $property) {
                        $startOn    = $upcoming_value[1][$j];
                        $endOn  = $upcoming_value[2][$j];
                        $tempValue = 1;
                        $thumbGallery = $this->helper('catalog/image')->init($property, 'thumbnail', $property->getImage())
                                      ->resize(80, null); ?>
                        <p> <?php
                        echo '<tr>';
                        echo '<td width="10%"><span>' . $serialNumber . '</span></td>'; ?><!-- class="sno" -->
                        <td width="15%" style="line-height:0"> <img src="<?php echo  $thumbGallery ?>" style="width: 50px !important; height: 50px !important;border:2px solid #D4D4D5" /> </td>             
                        <?php echo '<td width="25%">' . $property->getName() . '</td>';
                        echo '<td width="15%">' . date('M d, Y h:i A',strtotime($startOn)). '</td>';
                        echo '<td width="15%">' . date('M d, Y h:i A',strtotime($endOn)). '</td>'; ?>
                        <?php if($cancelRequestconfig == 1){?>
                        <td width="24%">
                            <?php if($upcoming_value[7][$j] == 0){ ?>
                            <a href="javascript:void(0);" onClick="location.href='<?php echo Mage::getBaseUrl().'airhotels/order/cancelrequest/order_id/'.$upcoming_value[6][$j];?>'"><?php echo $this->__('Cancel Property'); ?> </a>
                            <?php }else{ ?>
                            <span style="color:#F54747;opacity:0.7;cursor: no-drop;"><?php echo $this->__('Cancel request sent'); ?> </span>
                            <?php }?>    
                        <?php } ?>
                        <?php echo '</tr>';
                } ?>       
            <?php if(empty($tempValue)) { ?><p  class="nocontent_available outline_style" style="padding:20px 0;"><?php echo $this->__('You have no trips'); ?></p><?php } ?>
  • You can print the single object and check all data in it. It might contain url. You can do it by: echo "<pre>"; print_r($property) in "foreach ($propertyCollection as $property) {" loop. Apr 23, 2018 at 6:28

1 Answer 1


Please note that questions regarding 3rd party extensions are considered out of scope in this forum. The source code is not available most of the time, so an answer may be not possible.

Regarding your question, it might indeed be a problem that the code is not available. There is a custom model Mage::getModel('airhotels/property') that belongs to this extension and I don't know which class it extends and which functions are available.

From the fact that it is used with Mage_Catalog_Helper_Image a few lines later I guess that it extends Mage_Catalog_Model_Product. This means that you should be able to get the link like this:

<a href="<?php echo $property->getUrl() ?>">Text</a>

If that does not work, you can look through the module to find other places where a a property is linked and copy that code to your location.

The best way to solve this would imho be to contact the extension provider.

  • The code suggested worked perfectly. Thanks! Just needed to decide the right place to insert the code and celebrate :) Apr 27, 2018 at 1:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.