Support » Plugin: imacPrestashop » Change Price format from Euro to Pound

  • Resolved ukbaz

    (@ukbaz)


    Hi have been tring this on a test server and all seems to be going OK apart from one thing.

    Currency format for Euro places the currency symbol after the price, whereas Currency format places symbol before the price. i.e £25.99

    I have successfully changed the price format & currency from Euro and a , separator to £ and a . separator in some places but still having an issue where the default values are used from the hard coded option…

    It seems to need changing in the following:
    if ($dto!=”){
    $precio_con_final=($precio_final-$dto);
    $txt_dto=number_format($dto, 2, ‘.’, ”).” £”;
    }
    Can you show me how to get the £ in front?

    Best regards
    Baz

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author imacreste

    (@imacreste)

    Hi.

    $txt_dto=”£”.number_format($dto, 2, ‘.’, ”);

    Rgs

    Great – thank you it works!

    Theer is one other thing though… If you have an ‘expired ‘special price’ but have not deleted it when date expired, the product still shows the discount!

    Is there a conditional statement needed re reduction being acive or not somewhere?

    Thanks

    Plugin Author imacreste

    (@imacreste)

    Hi.

    Prestashop pricing conditions are multiple. And making a plugin that controls all of them is a matter of many hours of work.

    Maybe in a few months / years I can improve it.

    For now I suggest you keep Prestashop up to date, removing expired offers.

    Tks

    thanks for the quick reply..
    In the connect to database option there is a checkbox ‘hide offers’
    Is it possible to add this in the webservice connect option as well?

    Would this work:

    if (isset($_POST[‘option_pass_ws’])){
    check_admin_referer(‘save_imac_settings’,’imacprestashop_save_settings’);
    $imacprestashop_options[‘option_url_ws’]=sanitize_text_field($_POST[‘option_url_ws’]);
    $imacprestashop_options[‘option_pass_ws’]=imacprestashop_encryption::encrypt($_POST[‘option_pass_ws’]);
    $imacprestashop_options[‘option_language_ws’]=sanitize_text_field($_POST[‘option_language_ws’]);
    $imacprestashop_options[‘show_language’]=sanitize_text_field($_POST[‘show_language’]);
    $imacprestashop_options[‘option_urlP_ws’]=sanitize_text_field($_POST[‘option_urlP_ws’]);
    $imacprestashop_options[‘option_products_ws’]=sanitize_text_field($_POST[‘option_products_ws’]);
    $imacprestashop_options[‘option_category_ws’]=sanitize_text_field($_POST[‘option_category_ws’]);
    $imacprestashop_options[‘option_nofollow_ws’]=0;
    if (isset($_POST[‘option_nofollow_ws’]))$imacprestashop_options[‘option_nofollow_ws’]=sanitize_text_field($_POST[‘option_nofollow_ws’]);
    $imacPrestashop_options[‘option_offers_ws’]=0;
    if (isset($_POST[‘option_offers_ws’]))$imacPrestashop_options[‘option_offers_ws’]=sanitize_text_field($_POST[‘option_offers_ws’]);
    update_option( ‘imacprestashop_options’, $imacprestashop_options );

    And for the check box:

    <tr valign=”top”>
    <th scope=”row”>
    <?php _e(“Hide Offers:”, “imacPrestashop”);?>
    </th>
    <td>
    <input type=”checkbox” name=”option_offers_ws” value=”1″ <?php checked( $imacPrestashop_options[‘option_offers_ws’], ‘1’ ); ?> />
    <?php _e(“<br>If the box is selected, special offer prices will not be displayed, only the full price of the products.”, “imacPrestashop”);?>
    </td>
    </tr>

    Plugin Author imacreste

    (@imacreste)

    I just uploaded a new version with the option to not show offers. I hope that this way the plugin will be useful.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.