Shipping option is required?


  • Default avatar
    robert    
     14 years ago
    0

    My installation seems to be requiring customers to select a shipping option when purchasing a gift certificate, which doesn't make any sense. How do I work around that?
  • Your avatar
    seyi    
     14 years ago
    0

    try this:
    https://awodev.com/forum/awocoupon/help-section/coupon-value-exceeds-total-order#comment-335
  • Default avatar
    robert    
     14 years ago
    0

    Seyi, that's not the problem. In this case, the customer is trying to purchase the coupon itself, and it is triggering shipping. However as we know there is no shipping on a virtual product.
  • Your avatar
    seyi    
     14 years ago
    0

    Ah yes, that would be a different problem. I searched virtuemart forum long and hard, and apparently virtuemart does not even support downloadable and normal products properly. You can set your store either to ask for shipping or not, cant have a mix. I wrote a little hack to bypass shipping. Disclaimer: did not spend much time testing this so use at your own risk. My version, 1.1.5.

    In www/administrator/components/com_virtuemart/classes/ps_checkout.php around line 58, change
    <?php
    if( $vendor_freeshipping && $vars['order_subtotal_withtax'] >= $vendor_freeshipping) {
    ?>


    to
    <?php
    // seyi_code: generate free shipping for gift certificate products
    $_product_ids_to_skip_shipping = array(17,21);
    $_products_in_cart = array();
    foreach(
    $_SESSION['cart'] as $k=>$cart) { if(is_array($cart)) $_products_in_cart[] = $cart['product_id']; }
    $_invalid_free_shipping_products array_diff($_products_in_cart,$_product_ids_to_skip_shipping);
    $_bypass_shipping = !empty($_products_in_cart) && empty($_invalid_free_shipping_products) ? true false;
            
    if( (
    $vendor_freeshipping && $vars['order_subtotal_withtax'] >= $vendor_freeshipping) || $_bypass_shipping) {
    ?>


    This hack requires hardcoding the products that need to skip shipping in variable $_product_ids_to_skip_shipping. In this example, product_ids of 17 and 21 are gift certificate products.
  • Default avatar
    robert    
     14 years ago
    0

    Seyi, I solved the problem. I simply used the standard shipping module and configured it to apply zero dollar cost shipping for items of zero weight.
  • Your avatar
    seyi    
     13 years ago
    0

    great, so simple
  • Default avatar
    david6    
     13 years ago
    0

    @seyi
    Is your work around still feasible and do you consider it safe. We are a point we have to reimburse some money do to the shipping fee being added. We use USPS and UPS shipping module so if there is zero weight it will return an error.

    UPDATE: 5/26/11

    No hack needed to achieve Free Shipping. Click link. It works without a cheat.

    http://forum.virtuemart.net/index.php?topic=71811.0

This thread is locked.