【问题标题】:How to create link to go to shopping cart如何创建链接到购物车
【发布时间】:2014-01-17 20:56:27
【问题描述】:

我在 /example/index.php 页面上有以下 href,我想将其带到我的 magento 购物车:

href="/example/catalog/index.php/checkout/cart/"

但是,它总是重定向到 /example/catalog/

当我在 /example/catalog/ 并触发相同的 href 时,它会转到正确的页面,但不是从我的主页。

谁能解释一下如何解决这个问题?

【问题讨论】:

    标签: magento redirect checkout cart


    【解决方案1】:

    您的 Magento 安装在 /example/catalog/ 内吗?

    如果是,那么你可以

    href="<?php echo $this->getUrl('checkout/cart') ?>"
    

    【讨论】:

    • 是的,Magento 安装在 /example/catalog/ 中,但 href 来自 /example/。当我使用您提供的代码时,我会被禁止访问。当我将上面的 url 直接输入浏览器时,它会消失,但来自 href 时不会
    猜你喜欢
    • 2011-10-19
    • 1970-01-01
    • 1970-01-01
    • 2016-01-29
    • 2020-10-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多