Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter lourencolemos

    (@lourencolemos)

    Hey, ideally this would be perfect, however when our POS system updates a products price, it syncs to wordpress and thats the end price.

    I need a simple plugin way-plugin that adds a markup or discount independently of the product price, so if today the price is 5€ and its adding 5% markup, tomorrow the product price is 6€ and I still want a 5% markup.

    Thread Starter lourencolemos

    (@lourencolemos)

    Great, you’ll have a new costumer soon, thanks.

    Thread Starter lourencolemos

    (@lourencolemos)

    Hey Amanda, you can close this as I have found a solution.

    function action_woocommerce_admin_order_item_values( $null, $item, $absint ) {
        $val = ($item['type'] == 'line_item' || $item['type'] == 'shipping') ? $item['total'] + $item['total_tax'] : ' ';
        $valdecimal = wc_format_decimal( $val, $dp='', $trim_zeros );
        ?>
        <td class="item_fcost" data-sort-value="<?php echo $val; ?>">
            <div class="view" style="font-weight: bold; text-align: right; padding-right: 10px;">
                <?php if ($val>0) echo '€'; echo $valdecimal;?>
            </div>
        </td>
        <?php
    };
    add_action( 'woocommerce_admin_order_item_values', 'action_woocommerce_admin_order_item_values', 10, 3 );
    
    function action_woocommerce_admin_order_item_headers( $order ) {
        echo '<th class="item_fcost sortable" data-sort="float" style="text-align: right;">Pre?o com IVA</th>';
    };
    add_action( 'woocommerce_admin_order_item_headers', 'action_woocommerce_admin_order_item_headers', 10, 3 );

    This was the code that I used, it added a new column on the backoffice order panel that allows me to see each product price with the price already included. Including order total.

    Thread Starter lourencolemos

    (@lourencolemos)

    Alright, thank you.

    Thread Starter lourencolemos

    (@lourencolemos)

    Hi Corrina,

    It seems I fixed it by editing the htacess file myself and forcing https myself on all site links by using the search and replace database plugin.

    Here’s the code:

    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE] 
    
    # BEGIN WordPress
    	<IfModule mod_rewrite.c>
    	RewriteEngine On
    	RewriteBase /
    	RewriteRule ^index\.php$ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
    	RewriteCond %{REQUEST_FILENAME} !-f
    	RewriteCond %{REQUEST_FILENAME} !-d
    	RewriteRule . /index.php [L]
    	</IfModule>
    	# END WordPress

    Thanks for your help, very kind.

Viewing 5 replies - 1 through 5 (of 5 total)