试图在这里编译Magento 1.6:
Magento管理面板,系统,工具,编译
它编译然后我启用它.在那之后,网站死了.这是堆栈(但这并不重要)
Warning: include_once(Mage_Core_functions.php) [function.include-once]: failed to open stream: No such file or directory in /home/mysite/public_html/app/Mage.php on line 36
Warning: include_once() [function.include]: Failed opening 'Mage_Core_functions.php' for inclusion (include_path='/home/mysite/public_html/includes/src:.:/usr/lib/php:/usr/local/lib/php') in /home/mysite/public_html/app/Mage.php on line 36
Warning: include_once(Varien_Autoload.php) [function.include-once]: failed to open stream: No such file or directory in /home/mysite/public_html/app/Mage.php on line 37
Warning: include_once() [function.include]: Failed opening 'Varien_Autoload.php' for inclusion (include_path='/home/mysite/public_html/includes/src:.:/usr/lib/php:/usr/local/lib/php') in /home/mysite/public_html/app/Mage.php on line 37
Fatal error: Class 'Varien_Autoload' not found in /home/mysite/public_html/app/Mage.php on line 53
Run Code Online (Sandbox Code Playgroud)
重要的是:如何重新开始?也许通过编辑MySQL表?
我正在创建一个magento 2主题.我只想知道如何xml layout, static block, cms page在其他.phtml文件中添加.phtml 文件.谢谢.
我有以下代码来获取产品列表
$collection = Mage::getModel('catalog/product')->getCollection();
$collection->addAttributeToSelect('name')
->addAttributeToFilter("category_ids", array('finset'=>$this->category_id));
foreach($collection as $product) {
echo $product->getName();
}
Run Code Online (Sandbox Code Playgroud)
我的问题是,我怎么能不回应"简单"但属于父"可配置"产品的产品.(例如,不要显示"Red Shirt Medium",因为它属于"Red Shirt")
我已经知道这个协会住在' catalog_product_super_link'但我刚刚开始使用Magento并且不幸的是不知道如何进行过滤:)
干杯伙计们,
克里斯.
我试图将会话时间限制设置为magento的30分钟,但它不会在30分钟内到期.我进入了系统 - >配置 - > Web->会话Cookie管理,并为该字段设置了1800值,Cookie Life time但仍然没有在指定的超时限制内使会话到期.我不知道Magento前端会话有什么问题.
我在正确的位置设置限制吗?magento后端是否有任何其他设置来设置前端会话超时限制.
我想根据不同属性的几个标准选择产品.
我知道如何使用 $collection->addAttributeToFilter('someattribute', array('like' => '%'));
但是我想对OR条件使用几个属性.
喜欢:
$collection->addAttributeToFilter('someattribute', array('like' => 'value'));`
Run Code Online (Sandbox Code Playgroud)
要么
$collection->addAttributeToFilter('otherattribute', array('like' => 'value'));`
Run Code Online (Sandbox Code Playgroud)
获得"某些属性" 或 "分配"设置为"价值"的产品
可能吗?
当我的网站开始抛出异常"前端控制器达到100路由器匹配迭代"时,我的网站每天下降一到两次.一旦发生这种情况,访问管理员和前端就会消失.我刚刚离开了一个错误页面.
这是从Magento 1.5.0.1升级到1.5.1.0后开始的.如果我手动清除var/cache /目录,我就会重新运行.
我已经用Google搜索了这个.在有限的搜索结果中,我发现没有什么能帮助我解决这个问题.
任何有关为什么会发生这种情况以及如何解决这些问题的见解将不胜感激.
--update -----------------------
使用Andrey Tserkus的有用答案中提供的调试代码,我能够确定错误是由我的一些路由器消失引起的.
调试代码输出的普通路由器是:总计7:admin,标准,cms,amshopby,fishpig_wordpress,seosuite,默认
发生错误时,它们已更改为:Total 3:admin,standard,default
当发生这种情况时,似乎缺少的路由会导致代码针对每个页面请求迭代到100.我将进一步研究这种情况.
如何获得与可配置产品相关的所有简单产品?我发现如何做相反的事情(从简单的产品中获得可配置的产品),但这不是我需要的.
我想显示我所选产品的库存量(可配置属性).我最初的想法是打印所有数量的库存并使用jQuery控制显示.任何的想法?
我正在尝试创建自定义REST API.我创建了自己的模块Custom/Restapi.Custom [Namespace],Restapi [Module name].
在etc文件夹中,我创建了config.xml和api2.xml.以下是代码 - :
config.xml中
<?xml version="1.0"?>
<config>
<modules>
<Custom_Restapi>
<version>0.1.0.0</version>
</Custom_Restapi>
</modules>
<global>
<models>
<restapi>
<class>Custom_Restapi_Model</class>
</restapi>
</models>
</config>
Run Code Online (Sandbox Code Playgroud)
api2.xml
<config>
<api2>
<resource_groups>
<restapi translate="title" module="Custom_Restapi">
<title>Custom Rest API</title>
<sort_order>10</sort_order>
</restapi>
</resource_groups>
<resources>
<restapi translate="title" module="Custom_Restapi">
<group>restapi</group>
<model>restapi/api2_restapi</model>
<title>Testing My Rest API</title>
<sort_order>10</sort_order>
<privileges>
<admin>
<create>1</create>
<!-- <retrieve>1</retrieve>
<delete>1</delete>-->
</admin>
<!-- <customer>
<create>1</create>
<retrieve>1</retrieve>
<delete>1</delete>
</customer>
<guest>
<create>1</create>
<retrieve>1</retrieve>
<delete>1</delete>
</guest>-->
</privileges>
<routes>
<route_entity>
<route>/custom/createwebsite/:s</route>
<action_type>entity</action_type>
</route_entity>
</routes>
<versions>1</versions>
</restapi>
</resources>
</api2>
Run Code Online (Sandbox Code Playgroud)
模型目录结构
应用程序\代码\本地\自定义\ RESTAPI …
所以我已经让magento 2正常运行,我甚至开始自己的主题,但我已经尝试在安装magento之后安装示例数据.它在终端中返回了"区号未设置:",下面是我的步骤.
bin/magento sampledata:deploy
composer update
Run Code Online (Sandbox Code Playgroud)
哪个回报:
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing magento/module-catalog-sample-data (100.0.3)
Downloading: 100%
- Installing magento/module-bundle-sample-data (100.0.3)
Downloading: 100%
- Installing magento/module-widget-sample-data (100.0.3)
Downloading: 100%
- Installing magento/module-customer-sample-data (100.0.3)
Downloading: 100%
- Installing magento/sample-data-media (100.0.3)
Downloading: 100%
- Installing magento/module-theme-sample-data (100.0.3)
Downloading: 100%
- Installing magento/module-cms-sample-data (100.0.3)
Downloading: 100%
- Installing magento/module-catalog-rule-sample-data (100.0.3)
Downloading: 100%
- Installing magento/module-sales-rule-sample-data (100.0.3)
Downloading: 100%
- Installing magento/module-review-sample-data (100.0.3)
Downloading: 100%
- Installing magento/module-tax-sample-data …Run Code Online (Sandbox Code Playgroud) magento ×10
php ×6
magento-2.0 ×2
magento2 ×2
attributes ×1
collections ×1
compilation ×1
composer-php ×1
exception ×1
rest ×1