Magento 的自有运输模块 - 单页结账中的下一步不再起作用

发布于 2024-09-28 17:58:02 字数 2823 浏览 2 评论 0原文

干杯, 我为 magento 1.4.1.1 创建了自己的运输模块。 ,到目前为止还不起作用。在对此感到非常沮丧之后,我完全复制了 http 中的所有内容://www.magentocommerce.com/wiki/5_-_modules_and_development/shipping/create-shipping-method-module

与我自己的模块一样,它不起作用。在单页结帐中,输入送货地址时我无法进一步操作,并且 firebug 指示我的送货方式未出现在可用送货选项列表中。

我的模型类确实已加载,我之前解决了这个问题。但由于某种奇怪的原因,它不会出现在前端,而且我目前正在使用 wiki 中的确切文件。

请问,有人知道这里可能出了什么问题吗?

提前致谢!

编辑:这是我的配置 xml:

      <config>
    <modules>
  <!-- declare module's version information -->
      <YourCompany_NewModule>
  <!-- this version number will be used for database upgrades -->
        <version>0.1.0</version>
      </YourCompany_NewModule>
    </modules>
    <global>
  <!-- declare model group for new module -->
      <models>
  <!-- model group alias to be used in Mage::getModel() -->
        <newmodule>
  <!-- base class name for the model group -->
          <class>YourCompany_NewModule_Model</class>
        </newmodule>
      </models>
  <!-- declare resource setup for new module -->
      <resources>
  <!-- resource identifier -->
        <newmodule_setup>
  <!-- specify that this resource is a setup resource and used for upgrades -->
          <setup>
  <!-- which module to look for install/upgrade files in -->
            <module>YourCompany_NewModule</module>
          </setup>
  <!-- specify database connection for this resource -->
          <connection>
  <!-- do not create new connection, use predefined core setup connection -->
            <use>core_setup</use>
          </connection>
        </newmodule_setup>
      </resources>
    </global>
    <default>
            <carriers>
                <mage_newmodule>
                        <active>1</active>
                        <sallowspecific>0</sallowspecific>
    <model>newmodule/carrier_newmodule</model>
                        <name>New Module</name>
                        <title>New Module</title>
                        <specificerrmsg>
                            This shipping method is currently unavailable.
                            If you would like to ship using this shipping
                            method, please contact us.
                        </specificerrmsg>
                        <handling_type>F</handling_type>
                </mage_newmodule>
            </carriers>
    </default>

Cheers,
I created my own shipping module for magento 1.4.1.1. , which so far does not work. After really getting frustrated with this, I exactly copied everything from http://www.magentocommerce.com/wiki/5_-_modules_and_development/shipping/create-shipping-method-module .

As with my own module, it does not work. In the onepage checkout, I cannot go further when entering the shipping adress, and firebug indicates, that my shipping method does not appear in the list of available shipping options.

My model class indeed is loaded, I solved this problem earlier. But for some strange reason it will not appear in the frontend and again, I am currently using the exact files from the wiki.

Please, does anybody have any ideas what could be going wrong here?

Thanks in advance!

Edit: this is my config xml:

      <config>
    <modules>
  <!-- declare module's version information -->
      <YourCompany_NewModule>
  <!-- this version number will be used for database upgrades -->
        <version>0.1.0</version>
      </YourCompany_NewModule>
    </modules>
    <global>
  <!-- declare model group for new module -->
      <models>
  <!-- model group alias to be used in Mage::getModel() -->
        <newmodule>
  <!-- base class name for the model group -->
          <class>YourCompany_NewModule_Model</class>
        </newmodule>
      </models>
  <!-- declare resource setup for new module -->
      <resources>
  <!-- resource identifier -->
        <newmodule_setup>
  <!-- specify that this resource is a setup resource and used for upgrades -->
          <setup>
  <!-- which module to look for install/upgrade files in -->
            <module>YourCompany_NewModule</module>
          </setup>
  <!-- specify database connection for this resource -->
          <connection>
  <!-- do not create new connection, use predefined core setup connection -->
            <use>core_setup</use>
          </connection>
        </newmodule_setup>
      </resources>
    </global>
    <default>
            <carriers>
                <mage_newmodule>
                        <active>1</active>
                        <sallowspecific>0</sallowspecific>
    <model>newmodule/carrier_newmodule</model>
                        <name>New Module</name>
                        <title>New Module</title>
                        <specificerrmsg>
                            This shipping method is currently unavailable.
                            If you would like to ship using this shipping
                            method, please contact us.
                        </specificerrmsg>
                        <handling_type>F</handling_type>
                </mage_newmodule>
            </carriers>
    </default>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

花心好男孩 2024-10-05 17:58:02

我无法让维基文章发挥作用。

因此,我编辑了 Flatrate.php 和 config.xml,这样我就可以在管理中进行更多设置,例如伦敦拥堵费。

这对我来说效果很好,但是有人很高兴,因为我懒得在本地进行超越。

将我的定制工时费率设置为我自己的模型是一个相对简单的过程,然后我可以将库存文件放回去。

因此我建议采用两步法。通过破坏核心文件来覆盖 Flatrate,然后当你让它工作时,然后将它放在一个单独的模块中。

你是对的,当它搞砸时,结帐就不起作用。

I could not get the wiki article to work.

Consequently I edited Flatrate.php and the config.xml for it so I coulds have more settings in the admin, e.g. London Congestion Charge.

This worked fine for me, but the someone had a benny because I hadn't bothered to do the over-ride in local.

It was a relative snip to get my customised Flatrate to my own model, I could then put the stock file back.

Hence I recommend the two-step approach. Over-ride the Flatrate by botching the core files, then when you have it working then put it out a separate module.

You are right that when it is messed up the checkout just does not work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文