我使用一步结帐。我已经添加了另一个网店
现在两个网店都使用/app/design/frontend/base/default/template/onestepcheckout/checkout. php
问题:我们在过去修改了这个文件,但我不能解决这个问题:->。我们的问题是:hatstore新开的?帽子店是我们的店名。我如何使这个问题动态显示?因此,当他们访问我们的其他服装店时,显示"新服装店"。
>。我们还在这个文件中强制注册了一个url:hxxp://haststore.com/webshop/customer/account/create/我怎么能改变这一点,所以这将是动态的:hxxp://% shopurl % % shopstorename %/客户/账户/创建/
我找了很多,但没有找到它。你能帮我吗?
您可以在模板文件中使用一个简单的if else条件首先从配置>管理商店从magento后端获取商店(网店)ID/代码。
$code = Mage::app()->getStore()->getCode();
if($code == 'hat') // suppose your store code for HATSHOP is hat.
{
echo 'question: New at hatstore?';
//anything else
}
else
{
echo 'question: New at clothstore?';
//anything else
}
跟随anz的回答。获取当前存储库基础URL
$this->getUrl('');
如果需要获得客户/帐户,那么尝试这样做
$this->getUrl('customer/account');