这是我用来获取属性的magento代码.
echo $_product->getResource()->getAttribute('attrcode')->getFrontend()->getValue($_product);
Run Code Online (Sandbox Code Playgroud)
此代码在view.phtml返回属性代码值时工作正常.
当我在list.phtml文件中写入相同的代码时,此代码将返回blank.
我错了.请帮忙.
我尝试了所有可能的方法来加速magento网站.但我没有得到任何结果.
我遵循了以下一些方法..
启用所有Magento缓存层.
启用gzip压缩.
安装GTspeed Plugiin并优化图像,js和CSS.
但没用.我的网站响应率仍然很低.
我在Magento中尝试了编译选项.但是它并没有变化,当我在一段时间后点击编译过程时它正在变得越来越好
500内部错误.
这是我的Magento网站:http://shyamwerragrandmart.com/
我还有另一个问题.在我的网站上尝试将任何产品添加到购物车时,它几乎需要30秒-1分钟才能添加到购物车中(使用ajax).这必须减少.我能为此做些什么?
在这里,我使用Go Daddy Web托管服务.
它具有无限的带宽和无限空间.
请建议我提高网站性能的更好选择.
我的SQL查询语句如下:
SELECT * FROM `sales_flat_order_grid` AS `main_table`
LEFT JOIN (SELECT * from `customer_address_entity_varchar`
WHERE attribute_id=31) AS `ce3`
ON main_table.customer_id=ce3.entity_id
Run Code Online (Sandbox Code Playgroud)
我需要将它翻译成Magento风格.我试过了
$collection = Mage::getResourceModel('sales/order_grid_collection');
$tel = Mage::getModel('eav/entity_attribute')->loadByCode('2', 'telephone');
$collection->getSelect()
->joinLeft(array('ce3' => 'customer_address_entity_varchar'), 'main_table.customer_id=ce3.entity_id', array('telephone' => 'value'))
->where('ce3.attribute_id='.$tel->getAttributeId())
Run Code Online (Sandbox Code Playgroud)
但是这不起作用,因为在连接之后应用了where语句导致查询总数小于sales_flat_order_grid.
如何在Magento的管理表单和网格中更改日期格式?
目前在我的系统中,它以2014年6月28日的格式显示,但在其他系统中,它显示为2014/06/28.
有谁知道如何更改管理面板?
欢迎大家提出意见.
我使用了javascript任务运行程序Grunt来测试使用grunt-uncss从单个页面中删除未使用的CSS样式.这很好用,但是我试图确定在大型动态框架上使用它的最佳方法,例如Magento(它有数千个文件).
任何人都可以确定使用Grunt和Magento的最佳方法,而无需确定单个配置的负载吗?对此有任何建议将不胜感激.
我试图在magento 1.9上安装一个主题.已将所有文件复制到正确的位置.
在系统 - >配置 - >设计 - >主题下我已经设置了主题名称的模板,外观,布局和默认值.
我认为我遇到的问题是'当前包名'它最初设置为'rwd',当它设置为this时,它加载默认的1.9 magento主题.但是,当我将其更改为"默认"时,它会加载magento基本主题.如果我将包名称设置为主题名称,它也会加载基本包.
皮肤目录结构

设计目录结构

我在magento应用程序(社区版)上拥有大约2.5个lachs(250K)产品和2600个子类别.
询问
SELECT 1 status
, e.entity_id
, e.type_id
, e.attribute_set_id
, cat_index.position AS cat_index_position
, e.name
, e.description
, e.short_description
, e.price
, e.special_price
, e.special_from_date
, e.special_to_date
, e.cost
, e.small_image
, e.thumbnail
, e.color
, e.color_value
, e.news_from_date
, e.news_to_date
, e.url_key
, e.required_options
, e.image_label
, e.small_image_label
, e.thumbnail_label
, e.msrp_enabled
, e.msrp_display_actual_price_type
, e.msrp
, e.tax_class_id
, e.price_type
, e.weight_type
, e.price_view
, e.shipment_type
, e.links_purchased_separately
, e.links_exist
, e.open_amount_min
, e.open_amount_max
, e.custom_h1
, …Run Code Online (Sandbox Code Playgroud) 有没有免费Google Checkout Extension or Plugins or Widgets的Magento或者什么是整合最简单的方法Google Checkout in Magento?
我有100000096的订单增量ID,我想得到它的发票ID,请帮我在magento实现这个,我试过
$incrementId = '100000096';
$order = Mage::getModel('sales/order')->load($incrementId);
$invIncrementIDs = array();
foreach ($order->getInvoiceCollection() as $inv) {
$invIncrementIDs[] = $inv->getIncrementId();
}
Run Code Online (Sandbox Code Playgroud)
但它返回一个空数组.
1)Magento .phtml文件中$ this/$ resource变量引用了什么?
2)在哪里可以找到我可以使用$ this/$ resource的方法列表?
print_r显示巨大的对象,其功能不是很容易理解.
magento ×10
mysql ×2
php ×2
admin ×1
ajax ×1
automation ×1
e-commerce ×1
gruntjs ×1
javascript ×1
left-join ×1
magento-1.8 ×1
nginx ×1
performance ×1
themes ×1