ResolvedHow to change “Order” Button title on product page using php function

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #28483
    studio.idwg
    Participant

    Hello,

    I need help with changing the “Order” button title on product page to “Add to Cart” using themes function.php:

    Please advise!

    Thanks

    #28487
    studio.idwg
    Participant
    This reply has been marked as private.
    #28492
    Althemist
    Keymaster

    Hello studio.idwg,

    1. No need to sue php function for this. Just use Loco Translate and change the text string.

    2. Not really sure what do you mean. Could you please explain more?

    BTW, there is no need to use the “private reply” feature where there is no sensitive data like login details in the post. The reason we use forum based support system is that other users with similar problems can benefit from already discussed topics. 🙂

    Regards,
    Dimitar

    #28517
    studio.idwg
    Participant

    Hi Dimitar,

    1. Thank you for informing about the Loco Translate app.

    2. Here is the link bbq-chicken-pizza product page, where you can clearly see a duplicate product image listed next to the original one. I have noticed that this only happens when one size variation is selected by default on product page.

    3. There is also another issue when no pizza size variation is selected by default but the crust options that are free ($0.00) are showing as $1.00 even after selecting a pizza size.
    Crunchy Thin and Soft Thin crust options should be free for all sizes, and only Soft Thick crust size price should remain variable based on pizza size selection.

    Is it possible to change that logic, so that when no pizza size variation is selected by default, the price for the 2 free (Crunchy Thin and Soft Thin) crust options is hidden, and stays hidden after selecting a pizza size variation option?.

    Here is the link to the product that I am referring to:

    craft-your-own-pizza product page

    #28524
    Althemist
    Keymaster

    Access Denied – GoDaddy Website Firewall

    Block reason: Access from your Country was disabled by the administrator.

    🙂

    #28533
    Danzso
    Participant

    I had the same “problem” with the price. I have a meal deal option, its contains all extra oprion. So its free when you choose this option but display 1.
    Check it, now im solve this with some php correction. (option.price): https://piripirimaghull.com/product/chicken-wrap/

    I will send the code if it possible 🙂

    #28535
    Althemist
    Keymaster

    As far as I can see the “regular” variation is set as default variation – e.g. – it’s pre-selected when you load the page. That’s why the addon price is initially set to 1. When you select the meal option it is set to 0, as it should.

    BTW, there are quite a lot cookies and session warning on your website and for some reason your addons are displayed 1 per row. Most probably some customization you made is causing this. You can “fix” the addons 2-column layout with CSS. Something like this:

    .summary form.cart div.product-addon p.form-row {
        width: 49.3%;
    }

    What kind of PHP correction are you talking about?

    #28545
    Danzso
    Participant

    /wp-content/plugins/lafka-plugin/incl/addons/templates/checkbox.php [line 7]
    $option_price > 0 –> $option_price > -1

    /wp-content/plugins/lafka-plugin/incl/addons/templates/checkbox.php [line 33]
    data-attribute-prices=”<?php echo esc_attr( json_encode( $attribute_prices ) ); ?>” –> data-attribute-prices=”<?php echo esc_attr( json_encode( $attribute_raw_prices ) ); ?>”

    I made this changes and its work when the price 0.
    (if i change the attributes displays the 0 and the other price) 🙂

    #28561
    studio.idwg
    Participant
    This reply has been marked as private.
    #28515
    studio.idwg
    Participant
    This reply has been marked as private.
    #28569
    Althemist
    Keymaster

    Hello Dave and @Danzso,

    Our lead developer Alex and the technical team are checking this now. Will let you know ASAP.

    #28616
    Alex
    Keymaster

    Hello,

    We’ve checked and we are able to reproduce the issue on our side.
    So when there is variable addon option set to 0, on the frontend the price doesn’t change when choosing this variation.

    Thanks, Danzso for the proposed fix. We will analyze, test and should be included in our next update soon.

    Regards,
    Alex

    #28617
    Danzso
    Participant

    I’m happy to help you. This fixed function works perfectly on my site. btw. thnanks for this cool theme 🙂

    #28628
    Althemist
    Keymaster

    Actually, your fix doesn’t work properly with taxes, so we have improved it further. Update with the new fix will be released later today.

    Thanks again for your feedback and your kind words. 🙂

    #28757
    studio.idwg
    Participant

    Hello, when can I expect the new fix. We are receiving a lot of customer complaints regarding this.

    Please advise,

    Thanks!

Viewing 15 posts - 1 through 15 (of 16 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register