I have a mystery question: in my magento shop there is a specific page (part of /customer/account but from an extension) where inline translation is not working at all.
To be more specific: If inline translation is enabled for the entire shop, then it does usually work fine. Menus, Sub-Menus, Titles, everything can be translated. But as soon I navigate to said page, I can't translate anything on the whole site. Not even the Menus and Sub-Menus, that do not even belong to the requested page. As soon as I navigate to another page, translation works fine again.
I'm really lost and I hope that you guys can point me to places where this might be configurated?
for full disclousure: the extension mentioned is Webkul_Marketplacepartner and the page mentioned is marketplacepartner/partnerproducts/mydashboard/
the source code of the phtml looks like this:
<?php
$customerid=Mage::getSingleton('customer/session')->getCustomerId();
$isPartner= Mage::getModel('marketplaceprofile/marketplaceprofile')->isPartner($customerid);
$partner=Mage::getModel('marketplaceprofile/marketplaceprofile')->getPartnerProfileById($customerid);
if($isPartner==1){?>
<link href="<?php echo $this->getSkinUrl('Customerpartner/css/global.css'); ?>" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->getSkinUrl('Customerpartner/css/jquery.jqplot.min.css'); ?>" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->getSkinUrl('Customerpartner/css/webkul-image-slider.css'); ?>" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->getSkinUrl('Customerpartner/css/shCoreDefault.min.css'); ?>" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->getSkinUrl('Customerpartner/css/shThemejqPlot.min.css'); ?>" rel="stylesheet" type="text/css" />
<script src="<?php echo $this->getSkinUrl('Customerpartner/js/jquery.min.js'); ?>" type="text/javascript"></script>
<script src="<?php echo $this->getSkinUrl('Customerpartner/js/jquery.jqplot.min.js'); ?>" type="text/javascript"></script>
<script src="<?php echo $this->getSkinUrl('Customerpartner/js/shCore.min.js'); ?>" type="text/javascript"></script>
<script src="<?php echo $this->getSkinUrl('Customerpartner/js/shBrushJScript.min.js'); ?>" type="text/javascript"></script>
<script src="<?php echo $this->getSkinUrl('Customerpartner/js/shBrushXml.min.js'); ?>" type="text/javascript"></script>
<script src="<?php echo $this->getSkinUrl('Customerpartner/js/jqplot.logAxisRenderer.min.js'); ?>" type="text/javascript"></script>
<script src="<?php echo $this->getSkinUrl('Customerpartner/js/jqplot.canvasTextRenderer.min.js'); ?>" type="text/javascript"></script>
<script src="<?php echo $this->getSkinUrl('Customerpartner/js/jqplot.canvasAxisLabelRenderer.min.js'); ?>" type="text/javascript"></script>
<script src="<?php echo $this->getSkinUrl('Customerpartner/js/jqplot.canvasAxisTickRenderer.min.js'); ?>" type="text/javascript"></script>
<script src="<?php echo $this->getSkinUrl('Customerpartner/js/jqplot.dateAxisRenderer.min.js'); ?>" type="text/javascript"></script>
<script src="<?php echo $this->getSkinUrl('Customerpartner/js/jqplot.categoryAxisRenderer.min.js'); ?>" type="text/javascript"></script>
<script src="<?php echo $this->getSkinUrl('Customerpartner/js/jqplot.barRenderer.min.js'); ?>" type="text/javascript"></script>
<script src="<?php echo $this->getSkinUrl('Customerpartner/js/jqplot.canvasTextRenderer.min.js'); ?>" type="text/javascript"></script>
<script src="<?php echo $this->getSkinUrl('Customerpartner/js/jqplot.canvasAxisLabelRenderer.min.js'); ?>" type="text/javascript"></script>
<style>
div.example-plot { height: 400px;width: 650px;}
</style>
<?php
$mysqlprefix = Mage::getConfig()->getTablePrefix();
$write = Mage::getSingleton('core/resource')->getConnection('core_write');
$k="";
$i=0;
$Optioncreated=0;
// prefix checking and execute code
$j=0;$op=0;
$weeklytotal=0;
$todaytotal=0.0;
$yeartotal=0.0;
$sk=array();
$allskulist=array();
$allmageprolist=array();
$$allorderids=array();
$s1=0;
$s2=0;
$s5=0;
$today=date("Y-m-d");
$sqlQuery = "select * from ".$mysqlprefix."marketplacepartner_entity_saleslist where mageproownerid =".$customerid." order by autoid desc";
$querydata=$write->query($sqlQuery);
$grandTotal = array();
$dataArr= array();
$currentCurrencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();
$baseCurrencyCode = Mage::app()->getBaseCurrencyCode();
foreach($write->fetchAll($sqlQuery) as $row){
$l=explode('-',$row['cleared_at']);
$day=substr($row['cleared_at'],0,10);
$row['actualparterprocost'] = round(Mage::helper('directory')->currencyConvert($row['actualparterprocost'], $baseCurrencyCode, $currentCurrencyCode),2);
$order = Mage::getModel('sales/order')->loadByIncrementId($row['magerealorderid']);
if($order->getStatus()!='pending'){
if($day==$today){
$todaytotal+=$row['actualparterprocost'];
}
$week_number = date('W');
$year = date('Y');
for($days=1; $days<=7; $days++)
{
$m=date('Y-m-d', strtotime($year."W".$week_number.$days));
if($day==trim($m))
{
$row['magerealorderid'].$weeklytotal=$row['actualparterprocost']+$weeklytotal;
}
}
$grandTotal[$l[1]]=$row['actualparterprocost']+$grandTotal[$l[1]];
$dataArr[]= $row;
}
}
?>
<div class="prdouctbackground">
<div class="maindash">
<h4 class="textcolor"><span><?php echo $this->__('My Vendor Dashboard') ?></span></h4>
<div class="salesmonth">
<div class="todaydash"><?php echo Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol(); if($todaytotal<=0) {echo 0;} else {echo $todaytotal;}?> <span class="textcolordash"> <?php echo $this->__('Today') ?></span>
</div>
<div class="weekdash"><?php echo Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol(); if($weeklytotal<=0){ echo 0;} else {echo $weeklytotal;}?> <span class="textcolordash"> <?php echo $this->__('Week') ?></span>
</div>
<div class="monthdash"><?php echo Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol();
$d=date('m');
echo $grandTotal[$d];
?>
<span class="textcolordash"><?php echo $this->__('Month') ?></span>
</div>
</div>
<div class="salesemail"></div>
<div class="orderdproduct">
<table class="tablepostioneditdash">
<thead><tr>
<th class="headingbg"><span><?php echo $this->__('Latest Order') ; ?> </span></th>
</tr></thead>
<tbody id="tbodyingeditdash">
<?php
$m=0;
foreach($dataArr as $key=>$val){
$order = Mage::getModel('sales/order')->loadByIncrementId($val['magerealorderid']);
if($order->getStatus()!= 'pending'){ ?>
<tr>
<th class="tdpadfirsteditheadingdash">
<label for="name" class="rightgapeditheadedit">
<?php if($order->getStatus()=='pending') {?>
<div class="status" style="background-color:orange"><?php echo $this->__(strtoupper($order->getStatus())); ?> </div>
<?php }?>
<?php if($order->getStatus()=='canceled') {?>
<div class="status" style="background-color:red"><?php echo $this->__(strtoupper($order->getStatus())); ?> </div>
<?php }?>
<?php if($order->getStatus()=='complete') {?>
<div class="status" style="background-color:green"><?php echo $this->__(strtoupper($order->getStatus())); ?> </div>
<?php }?>
<?php if($order->getStatus()=='delivered') {?>
<div class="status" style="background-color:green"><?php echo $this->__(strtoupper($order->getStatus())); ?> </div>
<?php }?>
<?php if($order->getStatus()=='processing') {?>
<div class="status" style="background-color:blue"><?php echo $this->__(strtoupper($order->getStatus())); ?> </div>
<?php }?>
<p style="margin: 0 0 10px 6px;"><?php echo "<br>".$val['cleared_at']; ?></p> </label>
</th>
<th class="tdpadfirsteditheadingdash">
<label for="name" class="rightgapeditheadedit">
<div class="textcolordashdiv"><?php echo $this->__('Order'); ?> #<?php echo $val['magerealorderid']; ?></div>
<?php $shipping_address = $order->getShippingAddress();
if ( $shipping_address != null) {
?>
<div class="dd">
<?php echo "By: " . $shipping_address->getCustomerId(); ?>
<br>
<?php
$orddataing="SELECT * FROM ".$mysqlprefix."sales_flat_order_item where order_id='".$val['mageorderid']."' ORDER BY order_id DESC";
//$sqlProductQuery = "select * from ".$mysqlprefix."marketplacepartner_entity_saleslist where mageproownerid =".$customerid." AND magerealorderid='".$val['magerealorderid']."'";
$ordconnectioning = Mage::getSingleton('core/resource')->getConnection('core_read');
//$order = Mage::getModel('sales/order')->load($orderidenitity[$x]);
//$priceTwo = Mage::helper('directory')->currencyConvert($aa, $baseCurrencyCode, $currentCurrencyCode);
$shipammount=(int)$order->getShippingAmount();
$count=0;
$product;
foreach($ordconnectioning->fetchAll($orddataing) as $ordername){
$product=Mage::getModel('catalog/product')->load($ordername['product_id']);
if($ordername['product_id'] == $val['mageproid']){
if($count==0){
echo "<p style='color:silver;float:left;'>" . (int)$ordername['qty_ordered']." x ".$ordername['name']." (" . $product->getSku() .")</p>"; $proid[$m]=$ordername['product_id'];
}else{
echo "<p style='color:silver;float:left;'>, ". (int)$ordername['qty_ordered']." x ".$ordername['name']." (" . $product->getSku() .")</p>"; $proid[$m]=$ordername['product_id'];
}
$count++;
$m++;
}
}?>
</div>
<?php } ?>
</label>
</th>
<th class="tdpadfirsteditheadingdash">
<?php
/* (2014-01-07 AM) disabled till further notice */
?>
<label for="name" class="rightgapeditheadprice"><?php echo $this->__('Net margin') . ': '; echo Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol(); echo " ".$val['actualparterprocost']?> </label>
<?php
/**/
?>
</th>
<th>
<?php if($order->getStatus()=='processing') {?> <label for="name" class="rightgapeditheadedit">
<div class="status" style="background-color:blue"><?php echo $this->__('Ready To Shipped'); ?></div>
<p style='color:silver;text-align:center;'><a href="<?php echo $this->getUrl('customer/products/sendemailtoadmin') ?>?id=<?php echo $val['mageorderid'];?>"><?php echo $this->__('Click To Ship Item'); ?></a></p>
<p style='color:silver;text-align:center;'><?php
if ($order->hasInvoices()) {
$invoice = $order->prepareInvoice();
$invoice->register();
//$invoice->setEmailSent(true);
$invoice->save();
//$invoice->sendEmail();
$invoiceID = $invoice->getId(); ?>
<?php
/*
(2014-01-07 AM) disable till further notice
<a href="<?php echo $this->getUrl('sales/order/printInvoice/invoice_id/'.$invoiceID.'/') ?>" target="_blank"><?php echo $this->__('Print Invoice'); ?></a>
*/
?>
<?php } ?></p>
</label>
<?php }?>
<?php $updatedDate = $order->getUpdatedAt();
$terminationDays = $partner['terminationperiod'];
$TotalTime = strtotime($updatedDate) + $terminationDays * 86400;
$currentTime = time();
?>
<?php if($order->getStatus()=='delivered') {?>
<label for="name" class="rightgapeditheadedit">
<div class="status" style="background-color:green"><?php echo $this->__('Item Delivered'); ?></div></label>
<p style='color:silver;text-align:center;'><?php
if ($order->hasInvoices()) {
$invoice = $order->prepareInvoice();
$invoice->register();
//$invoice->setEmailSent(true);
$invoice->save();
//$invoice->sendEmail();
$invoiceID = $invoice->getId(); ?>
<?php
/*
(2014-01-07 AM) disable till further notice
<a href="<?php echo $this->getUrl('sales/order/invoice/order_id/'.$orderidenitity[$x].'/') ?>" target="_blank">Print Invoice</a>
*/
?>
<?php
if($currentTime <= $TotalTime){
?>
<p style='color:silver;text-align:center;'><a href="<?php echo $this->getUrl('customer/products/sendreceiveconfirmation') ?>?vid=<?php echo $customerid;?>&id=<?php echo $val['mageorderid']; ?>"><?php echo $this->__('Click After Item Received'); ?></a></p>
<?php } ?>
</p>
<?php } ?>
<?php } ?>
<?php if($order->getStatus()=='complete') {?>
<label for="name" class="rightgapeditheadedit">
<div class="status" style="background-color:green"><?php echo $this->__('Item Delivered'); ?></div></label>
<p style='color:silver;text-align:center;'><?php
if ($order->hasInvoices()) {
$invoice = $order->prepareInvoice();
$invoice->register();
//$invoice->setEmailSent(true);
$invoice->save();
//$invoice->sendEmail();
$invoiceID = $invoice->getId();
?>
<?php
/*
(2014-01-07 AM) disable till further notice
<a href="<?php echo $this->getUrl('sales/order/invoice/order_id/'.$val['mageorderid'].'/') ?>" target="_blank">Print Invoice</a>
*/
?>
<?php if($currentTime <= $TotalTime){
?>
<p style='color:silver;text-align:center;'><a href="<?php echo $this->getUrl('customer/products/sendreceiveconfirmation') ?>?vid=<?php echo $customerid;?>&id=<?php echo $val['mageorderid']; ?>"><?php echo $this->__('Click After Item Received'); ?></a></p>
<?php } ?>
<?php } ?></p>
<?php } ?>
</p>
<?php //} ?>
</th>
</tr>
<?php
}else { }
}
?>
</tbody>
</table>
</div>
<div class="review">
<h4 colspan="2" class="headingbg"><?php echo $this->__('Latest Comments & Reviews'); ?></h4>
<table class="reviewtable">
<?php
$c=0;$cc=0;$r=0;
// prefix checking and execute code
$productget="select entity_pk_value from ".$mysqlprefix."review ORDER BY created_at DESC";
$ownerread = Mage::getSingleton('core/resource')->getConnection('core_read');
$q5=0;
foreach($ownerread->fetchAll($productget) as $value){
$storepro[$q5]=$value['entity_pk_value'];
$q5++;
}
$listingpro = array_unique($storepro);
foreach($listingpro as $q2){
$allpro=Mage::getModel('catalog/product')->load($q2);
$owner=Mage::getSingleton('customer/session')->getCustomer()->getEntityid();
$ownerconnection = Mage::getSingleton('core/resource')->getConnection('core_read');
// prefix checking and execute code
$cusresult=$ownerconnection->query("SELECT * FROM ".$mysqlprefix."marketplacepartner_entity_data where userid='".Mage::getSingleton('customer/session')->getCustomer()->getEntityid()."' and sku='".$allpro['sku']."'");
$ownerkey=$cusresult->fetch();
if($allpro['sku']==$ownerkey['sku']){
$ownerread = Mage::getSingleton('core/resource')->getConnection('core_read');
// mysql prefix checking and execute code
$ownerreadresulting=$ownerread->query("select * from ".$mysqlprefix."review where entity_pk_value ='".$allpro['entity_id']."' ORDER BY created_at DESC");
$ownerget=$ownerreadresulting->fetch();
// prefix checking and execute code
$ownerreviewresulting=$ownerread->query("select * from ".$mysqlprefix."review_detail where review_id ='".$ownerget['review_id']."' ORDER BY review_id DESC");
$ownerreviewget=$ownerreviewresulting->fetch();
// here i code for mysql prefix checking and execute code
$ratdatasql="select rating_summary from ".$mysqlprefix."review_entity_summary where entity_pk_value='".$allpro['entity_id']."' ORDER BY primary_id DESC";
$ownerrateresult=$ownerread->query($ratdatasql);
$ownerrateresulting=$ownerrateresult->fetch();
if((gettype($ownerreviewget)=='array')&& (gettype($ownerrateresulting)=='array')){
if(($c==0)||($c==1)){?>
<tr class="ex2">
<th class="reviewtablethleft">
<?php
$detail=$ownerreviewget['title'];
$nickname=$ownerreviewget['nickname'];
$status_id=$ownerget['status_id'];
$created_at=$ownerget['created_at'];
$rating_summary=$ownerrateresulting['rating_summary'];
?>
<div class="ratingslider-box"><div class="rating" style="width:<?php echo ceil($rating_summary);?>%;"></div></div>
<?php $productcity=Mage::getModel('catalog/product')->load($allpro['entity_id']); ?>
<p class="rightgapeditheadedit" style="margin: 5px 0 10px 6px;float: left;"><?php echo $this->__('Product') ?> : </p>
<p class="textcolorproalter"><?php echo $productcity['name']; ?></p>
<p class="rightgapeditheadedit" style="margin: 0 0 10px 6px;float: left;"><?php echo $this->__('Comment By') ?>: </p>
<p class="textcolorproalter"><?php echo $nickname; ?></p>
<p class="rightgapeditheadedit" style="margin: 0 0 10px 6px;float: left;"> </p>
<p class="textcolorproalter1"><?php echo $detail; ?></p>
</th>
<th class="reviewtablethright">
<br><br>
<?php if($status_id==1){?>
<p class="statusapp"><?php echo $this->__('Approved'); ?></p>
<?php } else{ ?>
<p class="statussunapp"><?php echo $this->__('Unapproved'); ?></p>
<?php }?>
<br>
<p class="rightgapeditheadedit" style="margin:0 0 10px 37%;float: left;"><?php echo $this->__('Review On') ?> : </p>
<p class="textcolorpro"> <?php echo trim($created_at); ?></p>
<?php $c++;?>
</th>
</tr>
<?php }
}
$r++;
}
}?>
</table>
</div>
<br>
<?php
/*(2014-01-07 AM) disabled till further notice
<div class="example-plot" id="chart2"></div>
*/
?>
</div>
<div class="button-set buttonarea">
<p class="headingbackindex">
<a href="javascript:;" onclick="javascript: window.history.back();" class="left">« <?php echo $this->__('Back') ?></a>
</p>
</div>
</div>
<?php
/*(2014-01-07 AM) disabled till further notice
<script class="code" type="text/javascript" language="javascript">
jQuery.noConflict();
jQuery(document).ready(function(){
var line2 = [['1/1/<?php echo date('Y');?>', <?php if($aa<=0){ echo 0; } else { echo $aa; }?>], ['2/1/<?php echo date('Y');?>', <?php if($bb<=0){ echo 0; } else { echo $bb; }?>], ['3/1/<?php echo date('Y');?>',<?php if($cc<=0){ echo 0; } else { echo $cc; }?>], ['4/1/<?php echo date('Y');?>',<?php if($dd<=0){ echo 0; } else { echo $dd; }?>], ['5/1/<?php echo date('Y');?>',<?php if($ee<=0){ echo 0; } else { echo $ee; }?>], ['6/1/<?php echo date('Y');?>', <?php if($ff<=0){ echo 0; } else { echo $ff; }?>], ['7/1/<?php echo date('Y');?>', <?php if($gg<=0){ echo 0; } else { echo $gg; }?>], ['8/1/<?php echo date('Y');?>', <?php if($hh<=0){ echo 0; } else { echo $hh; }?>], ['9/1/<?php echo date('Y');?>', <?php if($ii<=0){ echo 0; } else { echo $ii; }?>], ['10/1/<?php echo date('Y');?>', <?php if($jj<=0){ echo 0; } else { echo $jj; }?>], ['11/1/<?php echo date('Y');?>', <?php if($kk<=0){ echo 0; } else { echo $kk; }?>], ['12/1/<?php echo date('Y');?>', <?php if($ll<=0){ echo 0; } else { echo $ll; }?>]];
var plot2 = jQuery.jqplot('chart2', [line2], {
axes: {
xaxis: {
renderer: jQuery.jqplot.DateAxisRenderer,
label: '<?php echo $this->__("Month"); ?>',
labelRenderer: jQuery.jqplot.CanvasAxisLabelRenderer,
tickRenderer: jQuery.jqplot.CanvasAxisTickRenderer,
tickOptions: {angle: 30}
},
yaxis: {
label: '<?php echo $this->__("Money") ?>',
labelRenderer: jQuery.jqplot.CanvasAxisLabelRenderer
}
}
});
});
</script>
*/
?>
<?php }else{
echo "<h2 style='color:#ff0000;font-weight:600'>".$this->__('FOR BECOME SELLER CONTACT TO ADMIN..')."</h2>";
}?>
please note that this code is not mine. I just have to deal with it.. -.-
The question has been answered by the support team of the modules developers. the reason for the not working inline translation was an error in a java script.
the fix looks like this:
<script class="code" type="text/javascript" language="javascript">
$wk_jq=jQuery.noConflict();
(function($wk_jq){
jQuery(document).ready(function(){
var line2 = [['1/1/<?php echo date('Y');?>', <?php if($aa<=0){ echo 0; } else { echo $aa; }?>], ['2/1/<?php echo date('Y');?>', <?php if($bb<=0){ echo 0; } else { echo $bb; }?>], ['3/1/<?php echo date('Y');?>',<?php if($cc<=0){ echo 0; } else { echo $cc; }?>], ['4/1/<?php echo date('Y');?>',<?php if($dd<=0){ echo 0; } else { echo $dd; }?>], ['5/1/<?php echo date('Y');?>',<?php if($ee<=0){ echo 0; } else { echo $ee; }?>], ['6/1/<?php echo date('Y');?>', <?php if($ff<=0){ echo 0; } else { echo $ff; }?>], ['7/1/<?php echo date('Y');?>', <?php if($gg<=0){ echo 0; } else { echo $gg; }?>], ['8/1/<?php echo date('Y');?>', <?php if($hh<=0){ echo 0; } else { echo $hh; }?>], ['9/1/<?php echo date('Y');?>', <?php if($ii<=0){ echo 0; } else { echo $ii; }?>], ['10/1/<?php echo date('Y');?>', <?php if($jj<=0){ echo 0; } else { echo $jj; }?>], ['11/1/<?php echo date('Y');?>', <?php if($kk<=0){ echo 0; } else { echo $kk; }?>], ['12/1/<?php echo date('Y');?>', <?php if($ll<=0){ echo 0; } else { echo $ll; }?>]];
var plot2 = jQuery.jqplot('chart2', [line2], {
axes: {
xaxis: {
renderer: jQuery.jqplot.DateAxisRenderer,
label: '<?php echo $this->__("Month"); ?>',
labelRenderer: jQuery.jqplot.CanvasAxisLabelRenderer,
tickRenderer: jQuery.jqplot.CanvasAxisTickRenderer,
tickOptions: {angle: 30}
},
yaxis: {
label: '<?php echo $this->__("Money") ?>',
labelRenderer: jQuery.jqplot.CanvasAxisLabelRenderer
}
}
});
});
})($wk_jq);
</script>