我在Magento中有一个带有以下内容的静态块:
<li><a href="#/contacts">Contact Us</a></li>
Run Code Online (Sandbox Code Playgroud)
我想用网站的基本网址替换#.我希望它动态检索它.
在我的Magento商店中,我创建了一个属性代码为'brand_info'的新属性.
如何将此属性的内容回显/打印到产品页面上,即.在描述下面?
谷歌在抓取网站时是否按下按钮并形成输入?我将rel ="nofollow"标签添加到链接中我不希望Google遵循但我不确定是否需要将它们添加到按钮中.
例如,"添加到购物车"按钮.
谢谢
我有这些链接:
<a class="active" href="#section1">Link 1</a>
<a href="#section2">Link 2</a>
Run Code Online (Sandbox Code Playgroud)
当单击链接2时,我希望它接收活动类并从链接1本身中删除该类,因此它将有效地变为:
<a href="#section1">Link 1</a>
<a class="active" href="#section2">Link 2</a>
Run Code Online (Sandbox Code Playgroud)
这应该是双向的.IE浏览器.点击任何链接获取该类并将其从另一个中删除.
如何使用JavaScript/Prototype完成这项工作?
在我的Magento商店中,我有时忘记在向缺货商品添加新库存后从下拉列表中选择"库存".
是否有可能以某种方式获得所有具有库存但标记为"缺货"的产品的清单?
我有下面的代码,打印出从现在起10个工作日的日期.在Opera和Chrome中,它可以按照我的预期和打印方式工作:2011年11月17日,星期四
但是在Firefox(6.0.2)中它打印出来:11/17/2011
有谁知道为什么日期不会在Firefox中作为字符串打印?
<script type="text/javascript">
function businessDays(n){
var D=new Date();
var num=Math.abs(n);
var tem,count=0;
var dir= (n<0)? -1: 1;
while(count< num){
D= new Date(D.setDate(D.getDate()+dir));
tem=D.getDay();
if(tem!=0 && tem!=6) ++count;
}
return D;
}
var D=businessDays(10).toLocaleDateString(); //string
document.write(D);
</script>
Run Code Online (Sandbox Code Playgroud) 我有以下代码在Magento中创建自定义菜单:
<?php
/**
* Catalog navigation
*/
class Infortis_Ultimo_Block_Navigation extends Mage_Core_Block_Template
{
//NEW:
protected $_isAccordion = FALSE;
protected $_categoryInstance = null;
/**
* Current category key
*
* @var string
*/
protected $_currentCategoryKey;
/**
* Array of level position counters
*
* @var array
*/
protected $_itemLevelPositions = array();
protected function _construct()
{
$this->addData(array(
'cache_lifetime' => false,
'cache_tags' => array(Mage_Catalog_Model_Category::CACHE_TAG, Mage_Core_Model_Store_Group::CACHE_TAG),
));
}
/**
* Get Key pieces for caching block content
*
* @return array
*/
public function getCacheKeyInfo() …Run Code Online (Sandbox Code Playgroud) 我使用以下页面创建Pinterest配置文件小部件:https: //business.pinterest.com/en/widget-builder#do_embed_user
问题是,当窗口小部件显示图像时,使用非安全链接.我需要在安全页面上显示小部件,因此需要它们为https://
我有什么想法可以解决这个问题吗?
当我查看我的Magento商店的错误日志时,它充满了以下错误:
[02-Jun-2011 13:49:12] PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mysite_mysite.core_file_storage' doesn't exist' in /home/mysite/public_html/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /home/mysite/public_html/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /home/mysite/public_html/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#2 /home/mysite/public_html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /home/mysite/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `e`.* FR...', Array)
#4 /home/mysite/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(337): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `e`.* FR...', Array)
#5 /home/mysite/public_html/lib/Zend/Db/Adapter/Abstract.php(753): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#6 /home/mysite/public_html/app/code/core/Mage/Core/Model/Mysql4/File/Storag in /home/mysite/public_html/lib/Zend/Db/Statement/Pdo.php on line 234
Run Code Online (Sandbox Code Playgroud)
有谁知道如何解决这个问题?
magento ×6
javascript ×2
firefox ×1
https ×1
magento-1.7 ×1
mysql ×1
nofollow ×1
php ×1
pinterest ×1
seo ×1