Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • +1 for this feature. Currently selling in USD but rates are given in MYR by FedEx. A simple multiplication factor would be adequate but real time currency exchange would be a bonus.

    Thread Starter rocketscream

    (@rocketscream)

    Hi Ewout,

    Thank you so much for giving a cleaner line of code even though I have fixed it.
    Will try it out.

    Thanks!

    Thread Starter rocketscream

    (@rocketscream)

    Okay figure it out from this topic.

    But as any order will consist of both simple and variable product, I would need to check whether an order item is a simple or variable product. Then I notice that variable product has a non-zero “variation_id” and simple product has a zero “variation_id”. So, here’s a quick and dirty implementation of 2 custom attribute (Description and HS Tariff):

    <dt class="description"><?php _e( 'Description:', 'wpo_wcpdf' ); ?></dt>
    	<dd class="description">
    	<?php 
    	if($item['variation_id'] != '0'){
    		$wpo_wcpdf->product_attribute('Description', $item['product']->parent); 
    	}
    	else{
    		$wpo_wcpdf->product_attribute('Description', $item['product']); 
        }
    	?>
    	</dd>
    <dt class="hs_tariff"><?php _e( 'HS Tariff:', 'wpo_wcpdf' ); ?></dt>
        <dd class="hs_tariff">
        <?php 
    	if($item['variation_id'] != '0'){
    		$wpo_wcpdf->product_attribute('HS Tariff', $item['product']->parent); 
    	}
    	else{
    		$wpo_wcpdf->product_attribute('HS Tariff', $item['product']); 
    	}
    	?>
    	</dd>
    • This reply was modified 7 years, 10 months ago by rocketscream.

    Definitely need this else I would need to list every single country as a zone.
    An example to illustrate this issue.
    Store uses 2 shipping courier, say DHL & FedEx.
    Zone A according to DHL consists of Singapore, Thailand & Vietnam.
    Zone 1 according to FedEx consist of Singapore only.

    In this case, only one of the zone for the country Singapore will show up. We can’t include both DHL and FedEx as shipping option under the same zone as the cost is different and the zone are not 100% line up.

    Unless we start categorizing each zone as a single country, I can’t see this problem could be solve by using the current setup in a simpler way. Having so many zones (as many as the countries) would grow the table unnecessarily long.

    • This reply was modified 7 years, 10 months ago by rocketscream.
Viewing 4 replies - 1 through 4 (of 4 total)