更新:这可能是版本问题,我应该更新到非稳定版2.0.4吗?
我知道这对某人来说应该是显而易见的,但显然不是.作为文件中的状态
在管理员中,转到商店>配置>设计.
但是只有机器人txt编辑,如下面的屏幕截图所示
我在github #4251上追查这个问题
所有设计配置都转移到了内容 - >设计 - >配置
当我到达那里时,我的自定义主题成功显示,但没有按钮可以更改它,如下所示.没有选项可以从默认的lumia主题更改为空白主题.
只有我吗?或者我是盲人,错过了一些非常明显的东西?我的磁力版是2.0.0
我很困惑如何将变量从控制器传递到视图.我知道有很多关于这个已经在库存溢出,但无法找到一个有效的,请指出我正确的方向.谢谢.
CONTROLLER
class StoreController extends Controller
{
public function index()
{
$store = Store::all(); // got this from database model
return view('store', $store);
}
{
Run Code Online (Sandbox Code Playgroud)
视图
// try a couple of differnt things nothing works
print_r($store);
print_r($store[0]->id);
print_r($id);
Run Code Online (Sandbox Code Playgroud) 我$categories在整个页面中使用它
$categories = Mage::getModel('catalog/category')
->getCollection()
->addAttributeToSelect('*')
->addAttributeToFilter('level',2)
->addIsActiveFilter()
->addAttributeToSort('position');
foreach($categories as $cat) {$children=$cat->getChildrenCategories();}
Run Code Online (Sandbox Code Playgroud)
选项1
//option 1
$children = $category->getChildren();
foreach(explode(',', $children) as $child):
$sub = Mage::getModel('catalog/category')->load($child);
$sub->getName() // this return ok, name show up
$sub->getImageUrl() // this return ok, image show up
Run Code Online (Sandbox Code Playgroud)
选项2可以使用,但由于某种原因无法获取图片网址。
//option 2
$children = $category->getChildrenCategories();
foreach($children as $sub):
$sub->getName() // this return ok, name show up
$sub->getImageUrl() // this return empty, image NOT show up so is other attribute beside name.
Run Code Online (Sandbox Code Playgroud)
有人可以解释差异吗?以及我如何选择2
我有一组简单的复选框,可以检查多个选项,但我希望它表现得像一个单选按钮,总是有一个选项被选中。
正如您在我的代码中看到的那样,复选框将被选中,而不是取消选中。请让我知道我做错了什么。谢谢
$('input[type=checkbox]').on('click', function(event) {
event.preventDefault();
if($('input[type=checkbox]:checked').length === 1 && $(this).is(':checked')) {
return false;
// there is only one checked AND the checked one is $this and we want to prevent it from uncheck
} else {
$(this).prop('checked', true);
alert($(this).prop('checked')); // this return true
}
});Run Code Online (Sandbox Code Playgroud)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<input type="checkbox" checked="checked"/>
<input type="checkbox"/>
<input type="checkbox"/>Run Code Online (Sandbox Code Playgroud)