Ubercart USPS 运输模块包裹选项
我们正在协助一位客户安装 Ubercart,他们在使用 USPS 的包裹时遇到问题,此外,购物车中的运输成本似乎相差甚远。我查看了 Ubercart 的 USPS 文档,它看起来真的很差,尤其是它的工作方式。有没有人有这方面的经验,或者可能有一些微调模块/API 的想法。
一个简单的示例问题
我想在运输设置下的管理中添加一些可用的包裹,在 USPS 产品描述下,只有几个可用的 USPS 包裹的完整选项。我想在这个字段中添加一些包。这是如何控制的?
There is a client we are assisting with an Ubercart installation and they are having issues with the packages that are used for USPS, in addition it seems that the shipping costs are way off in the cart. I have looked at the USPS documentation for Ubercart and it seems really poor especially in how it is working. Has anyone had any experience with this or maybe has some idea for fine tuning the module/API.
One Simple sample issue
I would like to add some available packages into the admin under the shipping settings, under the USPS product description there are only a couple of the full options for USPS packages available. I would like to add some packages into this field. How is this controlled?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
USPS 似乎将运输选项分为信封、包裹、国际。信封和国际机场。包裹。这些被硬编码到
uc_usps_shipping_method()
函数中的模块中。从那里开始,每种运输类型都有一组进一步的选项,可以在
admin/store/settings/quotes/methods/usps
中进行配置,在折叠的字段集中,您会发现一长串可以向客户提供的潜在选项(USPS First-Class Mail Postcard
等);我想这些更符合美国邮政服务可能提供的大量选项,也可能是您正在寻找的选项。不过,就添加新选项而言,您必须以编程方式执行此操作,因为上述选项再次硬编码到 USPS 模块中(查找模块文件中的最后 4 个函数)。我不完全确定你会如何执行此操作,因为我在 Ubercart 文档中的任何位置都找不到
hook_shipping_method_alter()
函数。希望至少有一点帮助
It seems USPS breaks the types of shipping option down into Envelope, Parcel, Intl. Envelope and Intl. Parcel. These are hard-coded into the module in the
uc_usps_shipping_method()
function.From there, each of these shipping types has a further set of options which can be configured at
admin/store/settings/quotes/methods/usps
, in the collapsed fieldsets you'll find a long list of the potential options that can be offered to the customer (U.S.P.S. First-Class Mail Postcard
etc.); I'd imagine these are more inline with the large set of options the US Postal Service probably provides, and probably the options you're looking for.As far as adding new ones goes though, you'd have to do this programmatically as the afore-mentioned options are again hard-coded into the USPS module (look for the last 4 functions in the module file). I'm not entirely sure how you'd go about doing this though as I can't find a
hook_shipping_method_alter()
function anywhere in Ubercart's docs.Hope that helps a bit at least