Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

  • 0
toplakd

OPC Language strings not updated

Question

I just noticed that by OPC checkout page (TB default one) the Language strings are not updated if address is changed from the one within tax area to the one without tax.

As with tax area one, the strings are tax included, and tax excluded for the other ones.

So, when one comes to checkout page and prices are showing tax included as his address is in taxable area, and than changes to addres 2 which is outside taxable area,

the prices change accordingly to county, but language strings remain the same. They only update if I hit f5 to refresh the page.

Is there any function that I can add to order-opc.js to refresh the whole shopping cart summary and delivery option?
It happens with or without AEUC module.

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Just for heads up.
This is not just TB Community theme's OPC issue, as have checked some other known opc modules, with same issue ūüôā

Edited by toplakd

Share this post


Link to post
Share on other sites
  • 0

Oh yeah.
Came up with solution which seems to be working.
Will test it some more and provide it here.

 

Share this post


Link to post
Share on other sites
  • 0

Have now tested it and it works as it should.

Replaced few lines in order-opc.js

Original lines were only removed, because with advanced module installed, the checkout page always showed order-carrier.tpl for 1 second, and than it was automaticly replaced with order-carrier-advanced.tpl.

With first green line I replaced the red lines (and it also refreshes the tax incl/tax excl),

second green line automaticly refreshes the shopping cart with apropriate language strings (tax incl/tax excl.
 

Quote

 

function updateCarrierList(json) {
  var html = json.carrier_block;
  $('#carrier_area').replaceWith(html);
  bindInputs();
  /* update hooks for carrier module */
  $('#HOOK_BEFORECARRIER').html(json.HOOK_BEFORECARRIER);

}

function updateCarrierList(json)
{
       $('#carrier_area').load(document.URL +  ' #carrier_area');
       $('#cart_summary').load(document.URL +  ' #cart_summary');

}

 

 

Share this post


Link to post
Share on other sites
  • 0
        // Update global var deliveryAddress
        deliveryAddress = idAddress_delivery;
        if (window.ajaxCart !== undefined) {
          $('.cart_block_list dd, .cart_block_list dt').each(function() {
            if (typeof($(this).attr('id')) != 'undefined')
              $(this).attr('id', $(this).attr('id').replace(/_\d+$/, '_' + idAddress_delivery));
                $('#cart_summary').load(" #cart_summary > *");  // alza refresh language strings on address change

Have now moved cart summary refresh  to apropriate section in order-opc.js, so refreshing is now only happening when address is changed from tax excl to tax incl.

Edited by toplakd
update

Share this post


Link to post
Share on other sites
  • 0

Have now finaly finished all the things (stil have to do a lot of testing) on my Advanced OPC checkout page, as the ADVANCED that comes with stock theme (PS and TB) is totaly not working.
My modified ADVANCED OPC does not support free shipping (small mod to enable) but it works as it should.

If there is carrier out of range, Terms, payments and payment buttons are disabled. (not working in original advanced)

If one chooses addres within tax area, the strings are updated to tax incl, and tax excl if outside tax area. (not working in original advanced)

If user logs in or creates account within OPC the navbar header is updated with user info block (not working in original advanced)

If user is not logged in, only cart summary and log in is visible on checkout page, one can log in on checkout pate or normal via Sign in.

Current OPC template is mixed use of Advanded and standard templates  and new set of files is created, so it does not mess up with Standard 5 step Advanced/standard templates.

After some more testing I will put it in my live store and than post it here if someone would want to try it out.

Edited by toplakd
  • Like 1

Share this post


Link to post
Share on other sites
  • 0

Finalized the OPC and is performing as it should.

Just making small adjustment on the OPC Login page as it will be used tabbed login, so long form for creating the account will not be opened by default, as one will be able to switch tabs between Sign In, which will be on main tab, and to Create account which will sit on second inactive tab.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

√ó