Jump to content

Need help finding file to fix


Dirty Butter

Recommended Posts

One of our store's Admin will not open the drop down to change any language wording. There is no indication that the page tries to load the choices at all. The other store works just fine. I tried using the admin folder from the working site on the non-working one, with no success. That would seem to say the issue is elsewhere, but I don't have a clue where to look.

 

Both stores have been upgraded to 5.2.10. This issue existed previously to the upgrade, but I have no idea when it quit working, as I don't have a need to change wording much any more. The new version did not fix it, as I hoped it would.

Link to comment
Share on other sites

"will not open the drop down"

 

The drop-selector will not deploy its list when clicked on? Please have the broswer show you the HTML source and find the HTML for that selector. Let us know if there are any <option> tags for it.

Link to comment
Share on other sites

Let's see if the browser is making the request to populate the list to your store. Hopefully, you still have Firefox/Firebug.

 

Start Firebug and click the Net tab. Make sure XHR is one of the items on the menu bar for the Net page. You do not have to select it.

 

Go to the page where you select one of the groups to show the list of phrases for that group. Select a group, such as Confirm.

 

Immediately, there should be a POST and a GET entries. The GET should look like:

GET /admin.php?_g=settings&node=language&language=en-US&type=confirm HTTP/1.1

Link to comment
Share on other sites

That tells me that the javascript that is supposed to "auto-submit" the form containing the drop-down selector is not firing. The relevant line of code is:

<select name="type" class="textbox update_form required">

 

The javascript that submits the form is in /js/common.js, line 109:

$('select.update_form').change(function(){ 
  $('input.required').removeClass('required'); 
  $(this).parents('form').submit(); 
});

That javascript file is loaded by this statement near the end of the admin skin template file main.php:

  <!-- Common JavaScript functionality -->
  <script type="text/javascript" src="js/common.js"></script>
  <script type="text/javascript" src="js/admin.js"></script>

So, make sure all that is there.
 

Link to comment
Share on other sites

Technically, the select portion of select.update_form is not required. It just makes sure that the target is a select tag. I recall making this edit by removing select so that something else in admin -- a hack that added a different kind of form element that needed to be auto-submitted -- would work. Maybe that hack was something you and I did?

Link to comment
Share on other sites

Other than something we did and I can't recall, what I do recall wasn't in admin. It was a hack I am working on that will auto-populate a follow-on set of form elements from a given choice.

 

I think it was:

A list of colors and a list of sizes.

Choose a color option: Red

Re-populate sizes that are red and in stock.

 

I am using radio buttons. So, I had to ditch the select portion of select.update_form.

Link to comment
Share on other sites

Leaving off select actually did turn out to be part of a hack you had previously helped me with. I wanted ALL shipping choices to show in a list, rather than a drop down. My Comments on element.basket.php give directions to also remove select in common.js. But the shipping choices show appropriately, even though I added select back.

Link to comment
Share on other sites

"The shipping choices show appropriately, even though I added select back to the javascript statement."

 

Yes, they would still show appropriately, but now selecting one does not auto-submit the form to get the newly selected shipping rates into the total. One would have to click Update Basket. I would hope that CubeCart would still use the newly selected shipping rates even though they were not shown on the Confirmation screen.

 

I still maintain that the drop-down selector to choose a language group should still auto-submit without select being there.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...