Hello friends,
for during checkout, where can I find the code for checking the value of chargeShipping(which is set on catalog/product page)? I tried finding it but could not find where actually it is checking if chargShipping is set to 'N'. I really appreciate the help. Thank you. su |
Shuchi,
ProductWorker class has a method shippingApplies() which checks for this field. This method in turn is used in OrderReadHelper.shippingApplies() and ShoppingCartItem.shippingApplies() to perform the check. ShoppingCart.shippingApplies() use ShoppingCartItem.shippingApplies() to check if there are shippable items in cart. ShoppingCart.shippingApplies() and OrderReadHelper.shippingApplies() is used in CheckoutHelper and CheckoutEvents which are classes responsible for checkout. These are also used in few more classes like ShippingEvents, InvoiceServices, PayPalServices, PayflowPro. You can refer these classes and check the code. -- Thanks & Regards Mridul Pathak Hotwax Media http://www.hotwaxmedia.com [hidden email] ------------------------------------------------- direct: +91 - 942.592.6892 On Tue, Nov 24, 2009 at 8:20 PM, su2 <[hidden email]> wrote: > > Hello friends, > > for during checkout, where can I find the code for checking the value of > chargeShipping(which is set on catalog/product page)? > > I tried finding it but could not find where actually it is checking if > chargShipping is set to 'N'. > > I really appreciate the help. > > Thank you. > su > -- > View this message in context: > http://n4.nabble.com/chargeShipping-on-catalog-product-page-tp786880p786880.html > Sent from the OFBiz - User mailing list archive at Nabble.com. |
Thanks Mridul for your reply.
My main goal is: Using chargeShipping dropdown, I want to offer free ground shipping on particular products, so basically I want to show all the other shipping options in as-is condition while making ground shipping as free for this particular item. Right now what is happening is: when I make chargeShipping = N, it does not show any shipping options for this item at all. I scanned through the shippingApplies function in ProductWorker, ShoppingItem and ShoppingCartItem files and tried to forcefully make shippingApplies = true (just to see if it would show all the shipping options for such products) but the attempts where unsuccessful. Could you please point me out where I might need to concentrate for making this happen? Thanks Again, and I appreciate your response and time on this. Shuchi-
|
Hello Suchi,
Did you try the shipping estimates? You can create shipping rules based on varied criteria. Have a look at http://www.goldencharm.co.uk/ and see how different shipping options are offered based on price. Thanks, Raj su2 wrote: > Thanks Mridul for your reply. > > My main goal is: Using chargeShipping dropdown, I want to offer free ground > shipping on particular products, so basically I want to show all the other > shipping options in as-is condition while making ground shipping as free for > this particular item. > > Right now what is happening is: when I make chargeShipping = N, it does not > show any shipping options for this item at all. > > I scanned through the shippingApplies function in ProductWorker, > ShoppingItem and ShoppingCartItem files and tried to forcefully make > shippingApplies = true (just to see if it would show all the shipping > options for such products) but the attempts where unsuccessful. > > Could you please point me out where I might need to concentrate for making > this happen? > > Thanks Again, and I appreciate your response and time on this. > > Shuchi- > > > > Mridul Pathak-2 wrote: > >> Shuchi, >> >> ProductWorker class has a method shippingApplies() which checks for this >> field. This method in turn is used in OrderReadHelper.shippingApplies() >> and >> ShoppingCartItem.shippingApplies() to perform the check. >> ShoppingCart.shippingApplies() use ShoppingCartItem.shippingApplies() to >> check if there are shippable items in cart. >> ShoppingCart.shippingApplies() >> and OrderReadHelper.shippingApplies() is used in CheckoutHelper and >> CheckoutEvents which are classes responsible for checkout. These are also >> used in few more classes like ShippingEvents, InvoiceServices, >> PayPalServices, PayflowPro. You can refer these classes and check the >> code. >> >> -- >> Thanks & Regards >> Mridul Pathak >> Hotwax Media >> http://www.hotwaxmedia.com >> [hidden email] >> ------------------------------------------------- >> direct: +91 - 942.592.6892 >> >> >> On Tue, Nov 24, 2009 at 8:20 PM, su2 <[hidden email]> wrote: >> >> >>> Hello friends, >>> >>> for during checkout, where can I find the code for checking the value of >>> chargeShipping(which is set on catalog/product page)? >>> >>> I tried finding it but could not find where actually it is checking if >>> chargShipping is set to 'N'. >>> >>> I really appreciate the help. >>> >>> Thank you. >>> su >>> -- >>> View this message in context: >>> http://n4.nabble.com/chargeShipping-on-catalog-product-page-tp786880p786880.html >>> Sent from the OFBiz - User mailing list archive at Nabble.com. >>> >> > > |
Hi Shuchi, Raj
Creating shipping estimates using price breaks and weight breaks of course is one option to create fine shipping rules, but still they apply on a product store as a whole and not on a single product. For instance, the case Shuchi has presented here can be very product specific, user may want to allow certain shipping methods for one of the products and it might not be possible to create shipping estimates based on price/weight breaks as other products fall in same range. Shuchi, chargeShipping won't help you here either. It just determines if a product has to be charged shipping or not, it doesn't allow you to associate certain shipping methods to the product. One way of doing this is to create Product and Shipment Method specific promotion, which will though show that particular shipping method for the product during checkout, but when selected will not apply shipping charges for that particular product. But if the requirements are very specific, like have ground shipping for free for a product and user don't even needs to select the shipping method (which means that if none selected, then ground shipping will be set in cart as default), then that is too custom a requirement and you will need to implement custom code for it, which will still need to create the promotion I specified. -- Thanks & Regards Mridul Pathak Hotwax Media http://www.hotwaxmedia.com [hidden email] ------------------------------------------------- direct: +91 - 942.592.6892 On Thu, Nov 26, 2009 at 10:09 AM, Raj Saini <[hidden email]> wrote: > Hello Suchi, > > Did you try the shipping estimates? You can create shipping rules based on > varied criteria. Have a look at http://www.goldencharm.co.uk/ and see how > different shipping options are offered based on price. > > Thanks, > > Raj > > > su2 wrote: > >> Thanks Mridul for your reply. >> >> My main goal is: Using chargeShipping dropdown, I want to offer free >> ground >> shipping on particular products, so basically I want to show all the other >> shipping options in as-is condition while making ground shipping as free >> for >> this particular item. >> >> Right now what is happening is: when I make chargeShipping = N, it does >> not >> show any shipping options for this item at all. >> I scanned through the shippingApplies function in ProductWorker, >> ShoppingItem and ShoppingCartItem files and tried to forcefully make >> shippingApplies = true (just to see if it would show all the shipping >> options for such products) but the attempts where unsuccessful. >> >> Could you please point me out where I might need to concentrate for making >> this happen? >> >> Thanks Again, and I appreciate your response and time on this. >> >> Shuchi- >> >> >> >> Mridul Pathak-2 wrote: >> >> >>> Shuchi, >>> >>> ProductWorker class has a method shippingApplies() which checks for this >>> field. This method in turn is used in OrderReadHelper.shippingApplies() >>> and >>> ShoppingCartItem.shippingApplies() to perform the check. >>> ShoppingCart.shippingApplies() use ShoppingCartItem.shippingApplies() to >>> check if there are shippable items in cart. >>> ShoppingCart.shippingApplies() >>> and OrderReadHelper.shippingApplies() is used in CheckoutHelper and >>> CheckoutEvents which are classes responsible for checkout. These are >>> also >>> used in few more classes like ShippingEvents, InvoiceServices, >>> PayPalServices, PayflowPro. You can refer these classes and check the >>> code. >>> >>> -- >>> Thanks & Regards >>> Mridul Pathak >>> Hotwax Media >>> http://www.hotwaxmedia.com >>> [hidden email] >>> ------------------------------------------------- >>> direct: +91 - 942.592.6892 >>> >>> >>> On Tue, Nov 24, 2009 at 8:20 PM, su2 <[hidden email]> wrote: >>> >>> >>> >>>> Hello friends, >>>> >>>> for during checkout, where can I find the code for checking the value of >>>> chargeShipping(which is set on catalog/product page)? >>>> >>>> I tried finding it but could not find where actually it is checking if >>>> chargShipping is set to 'N'. >>>> >>>> I really appreciate the help. >>>> >>>> Thank you. >>>> su >>>> -- >>>> View this message in context: >>>> >>>> http://n4.nabble.com/chargeShipping-on-catalog-product-page-tp786880p786880.html >>>> Sent from the OFBiz - User mailing list archive at Nabble.com. >>>> >>>> >>> >>> >> >> >> > > |
Hi Mridul, Raj
Thanks for your responses. Here is my case specific information. 1. We do not have any digital items OR ebooks. We always have to charge for shipping with various options for our customoers (ground shipping, 2 day air etc..). 2. Mridul, I think we already have the custom code that you are suggesting, because when our cart is over 300 $, the ground shipping becomes free for the customer and other options still are available at that point just in case if customer wants to get the item quicker by paying extra. 3. All what I need to do is: for promotional item, I want to call the same code that works for 300 $. As of today, when we mark the item as promotional item, we make the chargeShipping = N. As soon as the chargeShipping becomes N, we see no options available at all for shipping (which is understandable) But, I want to divert the code to do the same thing that it is doing today for over 300$. I am struggling to make this change. I am not sure exactly where/how can I make a change to divert the code to still show the other options while making ground shipping free for such promotional item? I have scanned through the ProductWorker, ShippingItem, ShippingCartItem, OrderreadHelper, ShippingEstimate, ProductPromoWorker etc. to see how ShippingApplies function is invoked and the value is used, but still could not figure it out. When I forcefully return true in ProductWorker's ShippingApplies() method, then that shows all the shipping options for that product, which makes sense too. In shipping.estimates.ftl file, I see that it is checking for: shoppingCart.getSubTotal()>=300 and prints FREE for that, but in my case, it does not go to that section at all, since I have chargeShipping = N and hence the main function checking in this file: <#if carrierShipmentMethodList?has_content> itself has no content. Do I need to flag somewhere else too other than chargeShipping value for my case? I really appreciate your time and efforts friends. I still need help. Thanks. Shuchi-
|
Free forum by Nabble | Edit this page |