Announcement

Collapse
No announcement yet.

Address book issues after 9.7 update

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Address book issues after 9.7 update

    Hi, I'm having issues with the address book CABK page after the 9.7 update. This is on a devsite so I can't post the link. But I'm wondering if anybody else can verify whether or not they're having this issue after the 9.7 update.

    Using the stock CABK Customer Address Book Layout from the template update page, when logging in as a customer, then accessing CABK Address Book page, none of the links work. If I select "Set as Default Shipping" or "Set as Default Billing" on an address, nothing happens. If I select, "Add Address", nothing happens. If I try to delete an address, I get a dialog box asking me if I want to delete. But when I do, nothing happens. Interestingly, if I return to using my pre 9.7 code here, everything works fine on this page.

    Also, a small issue I noticed on CADE edit address page. If an address is already the default shipping or billing, when you edit the address on CADE, it's not showing as such on that page. In other words, it still offers open checkboxes for "Set as Default Billing" and "Set as Default Shipping". I've forgotten how it behaved prior to the update. Either it offered the same as above but with the boxes prechecked. Or it said "Default Shipping Address" or "Default Billing Address" with no checkbox. Returning to pre 9.7 version doesn't seem to fix this as it did with CABK above.

    At this point, I'm not sure where to go. Either it's something simple that I'm overlooking, or my 9.7 update was corrupted, or this is a bug that needs to be worked out. Worst case, I suppose I can always go with another fresh install on the devsite. But I want to make sure that this issue wouldn't continue on a fresh install. Thanks!

    Kyle Creasy, Alphatect

    #2
    Do you have the (new in 9.07.00) "Require CSRF Token for Customer Actions" checkbox checked under Security on the Customer Settings tab of the Customers screen? If so, make sure the links in the Customer Address Book Layout template are as follows:

    Code:
    <a href="#" onclick="MMDynamic_Form_Submit( '&mvtj:urls:_self:secure;', { 'Action': 'CCSA', 'ShippingAddress_ID': '&mvtj:addressbook:address_ship:id;', 'CSRF_Token': '&mvtj:global:Basket:csrf_token;' } ); return false;" class="customer_account_address_actions_link">Set As Default Shipping</a><br />
    
    <a href="#" onclick="MMDynamic_Form_Submit( '&mvtj:urls:_self:secure;', { 'Action': 'CCSA', 'BillingAddress_ID': '&mvtj:addressbook:address_ship:id;', 'CSRF_Token': '&mvtj:global:Basket:csrf_token;' } ); return false;" class="customer_account_address_actions_link">Set As Default Billing</a><br />
    With the "Require CSRF Token for Customer Actions" option enabled those actions will be ignored unless the CSRF_Token parameter is included. I'll have someone double check our template changes post to make sure we didn't accidentally leave those changes out.

    Comment


      #3
      Thanks burch. I didn't have the "Require CSRF Token for Customer Actions" checkbox checked. (It's not mentioned on the template page.) But unfortunately that didn't fix this issue. I did notice that once I have this checked, I can no longer use my pre-9.7 code for CABK Address Book Layout. If I do, then when clicking "Set as Default Shipping", I get the error "Invalid customer token." and it doesn't allow the change. If I don't have the "Require CSRF Token for Customer Actions" box checked, then it will allow me to use my pre-9.7 code and make the change of default billing or shipping with no errors.

      One other thing I noticed, when using the pre-9.7 code for CABK Address Book Layout, when I hover over the links for "Set as Default Shipping", billing, Edit, or Delete, it shows me the address ID number in the link address, like "https://devsite.com/customer-address-book?Action=CCSA&ShippingAddress_ID=44" - for the "Set as Deault Shipping" link for example. But with the new stock template code for CABK, if I hover over any of these (except for Edit, which works fine), I get "https://devsite.com/customer-address-book#" - for the "Set as Default Shipping" link. It does that for the Delete link as well. It looks like whatever these items are looking for is missing. Maybe a bit of javascript? Maybe it's the "MMDynamic_Form_Submit" part? Maybe this part: "Action': 'CCSA'"? Is CCSA something that has to be enabled somewhere?

      I should also mention that adding a new address works fine (as does Edit) with the new stock 9.7 template code. In my first post I said it didn't work. That was wrong.

      Comment


        #4
        Well I went back and figured out why the Address Book wasn't working for me. I had to include this tag in the header:

        <mvt:item name="head" param="head_tag" />

        Now I've never included this in any of my other pages so far, as I've customized them and use my own css file - and everything worked great until the 9.7 update. Does anybody know what that pulls in? I'm thinking it pulls in some javascripts behind the scenes?

        I've added the above tag back to my CADE Address Edit page, but it hasn't fixed the problem there. It's not prechecking the default shipping or billing addresses on that page. I've narrowed it down to these lines not working:

        <mvt:if expr="g.Address_Default_Shipping">
        <mvt:if expr="g.Address_Default_Billing">

        The page or form isn't aware of it when the address is the default shipping or billing address. I'm wondering how I can get that to kick in? I'm guessing it's javascript related? I checked "JavaScript Resources" under "User Interface". There's nothing there. Should there be a js file there? Thanks!

        Kyle Creasy, Alphatect

        Comment


          #5
          That pulls in the global head tag component, I'm shocked you've never had issues previously.
          Thanks,

          Rick Wilson
          CEO
          Miva, Inc.
          [email protected]
          https://www.miva.com

          Comment


            #6
            Originally posted by Rick Wilson View Post
            That pulls in the global head tag component, I'm shocked you've never had issues previously.
            Thanks Rick. It almost seems like there are two different global head tags. If I goto: User Interface > Settings > HEAD Tag Content, the only thing there is this stock code, which I'm not currently using:

            <mvt:item name="prodctgy_meta" param="combined" />

            This doesn't seem to do anything, as I can delete that line without anything changing. Is this "HEAD Tag Content" not called by the global head tag I referenced above? It doesn't look like it in my case.

            Now when I add the global head tag line back to CABK, if I load the page and check in Firebug, it's adding these javascript lines (cleaned up a bit) to the head section:

            <script src="https://devsite.com/mm5/clientside.mvc?Filename=runtime_ui.js">
            <script src="https://devsite.com/mm5/clientside.mvc?Filename=ajax.js">
            <script src="https://devsite.com/mm5/clientside.mvc?Filename=runtime.js">
            <script src="https://devsite.com/mm5/clientside.mvc?Module_Code=cmp-cssui-searchfield&Filename=runtime.js">

            I guess my question is, do I have control over what the global head tag pulls in - or is it a behind the scenes thing?

            -------------------------------------------------------------
            Edit: I should mention that I've been hard coding the head tags on each page. It's a small site, so it's not difficult. But probably a habit I should break myself of. Anyway, that's why I never had problems with not using the global header tag. What seems strange is all the javascript that seems to go along with it. That's what I'm trying to get to the bottom of. Thanks!
            Last edited by alphatect; 11-13-17, 01:27 PM.

            Comment

            Working...
            X