我已尝试在cart.phtml中对getContinueShoppingUrl
进行硬编码以发送到特定网址,该网址工作正常。但是一个“空车页”似乎从Cart.php中提取了网址,这让我觉得编辑该网址并删除我的硬编码会更容易。
所以我的问题是,如何编辑Cart.php中的public function getContinueShoppingUrl()
来同时提供这两个继续购物网址?
我对此很陌生,所以请轻松一点;)
答案 0 :(得分:1)
In editing Magento code, I have found that grep-ing the codebase is an effective way to find what you are looking for. In this case:
grep "getContinueShoppingUrl(" . -r
Will search for all the instances of the text in the files. I usually like to run this from the /app directory instead of the root directory of Magento.
To answer your question the function you are looking for is in the /app/code/core/Mage/Checkout/Block/Cart.php
file.
Do not edit this file directly! Copy it to the local code pool!