【发布时间】:2012-07-05 10:53:16
【问题描述】:
您好想在 magento 中构建查询字符串。我试过了
<?php
echo $this->getUrl("catalog/category/view",
array(
"_use_rewrite"=>false,
"category"=>$_category->getId(),
"product"=>$_product->getId()
)
);
?>
我想要网址:
http://www.localhost.com/hungermunch/fujigrill/catalog/category/view?category=11&product=1
但我得到了
http://www.localhost.com/hungermunch/fujigrill/catalog/category/view/category/11/product/1/
我怎样才能获得所需的网址。有没有可能
【问题讨论】:
-
但是为什么你使用重写只是在类别 url 之后添加你想要的内容
-
我想通过 ajax 发送数据,所以我认为这样做很容易。如果有其他方法
-
使用类似 $this->getUrl("catalog/category/view")?product=pid&category=cid
-
嗨 samit rimal 我已经投票赞成你所有的问题和答案你的声誉现在从 15 增加到 57..现在很高兴..
标签: php magento-1.6