News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

I Can´t select state of my country

Started by nebular, December 30, 2011, 15:43:23 PM

Previous topic - Next topic

nebular

Hello Everybody. Sorry for my English I am Spanish.

I have installed joomla 1.7.2 and virtuemart only with versión 2.0.0. I installed aio 2.0.0 too.

I have a little error, when I click on edit profile on mi cart or I am creating a new user, I can see fields called country, city, etc. where i can select country, city etc. but I CAN´T select region or state, this simply doesn´t load with states of Spain.

Could you tell me how I can do for view this states in this list?



Thanks in advance and I wish you a happy new year...

PRO

did you enable the javascript?

[attachment cleanup by admin]

spacialek

Same problem here, but the JavaScript "Using the Script ajax Countries / Regions" is enabled
I'm on Joomla 1.5 + VirtueMart 2

spacialek

ok after reading this post http://forum.virtuemart.net/index.php?topic=95049.0 I found out that jQuery was loading also with the "Modalizer" third party plugin. I disabled the jQuery for both this particular plugin and VirtueMart, and then added the last jQuery js version in my template. It's working now! :)

nebular

Please, could you tell me how I can install Jquery in my template?


Thanks in advance...

spacialek



Here is the way I did:
I downloaded the jQuery file here: http://code.jquery.com/jquery-1.7.1.min.js and placed it in my "js" template directory.
Then I inserted the jQuery script in my index.php just before the
<jdoc:include type="head" />

So all together it looks like this:

<head>
  <script language="javascript" type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template;?>/js/jquery-1.7.1.min.js"></script>
  <jdoc:include type="head" />
</head>


This is for a Joomla 1.5 template, but I guess it's similar for Joomla 1.7

nebular

It´s strange.

When a select other country and then I pick Spain again, then I can select the correct state.

When you say template, you are reference to my joomla template or virtuemart template?
the index.php is on the root on my website?

Thanks for all and HAPPY NEW YEAR.

nebular

I think, that my actual joomla template hasn´t got js query.

nebular

It´s my scripts code:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
  <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js" type="text/javascript"></script>
  <script src="http://www.bionaturapets.com/components/com_virtuemart/assets/js/jquery.ui.autocomplete.html.js" type="text/javascript"></script>
  <script src="/media/system/js/core.js" type="text/javascript"></script>
  <script src="/components/com_virtuemart/assets/js/vmsite.js" type="text/javascript"></script>

  <script src="/media/system/js/mootools-core.js" type="text/javascript"></script>
  <script src="/media/system/js/mootools-more.js" type="text/javascript"></script>
  <script src="/media/system/js/tabs.js" type="text/javascript"></script>
  <script src="/media/system/js/validate.js" type="text/javascript"></script>
  <script src="/media/system/js/modal.js" type="text/javascript"></script>
  <script src="http://www.bionaturapets.com/components/com_virtuemart/assets/js/tabs.js" type="text/javascript"></script>

  <script src="/templates/rt_maelstrom_j16/js/style3.js" type="text/javascript"></script>
  <script src="/templates/rt_maelstrom_j16/js/gantry-module-scroller.js" type="text/javascript"></script>
  <script src="/libraries/gantry/js/gantry-smartload.js" type="text/javascript"></script>
  <script src="/libraries/gantry/js/gantry-inputs.js" type="text/javascript"></script>
  <script src="/templates/rt_maelstrom_j16/js/rt-fixedheader.js" type="text/javascript"></script>
  <script src="/modules/mod_roknavmenu/themes/fusion/js/fusion.js" type="text/javascript"></script>

  <script type="text/javascript">
jQuery( function($) {
         $(".virtuemart_country_id").vm2front("list",{dest : "#virtuemart_state_id",ids : "352"});
      });
   window.addEvent('domready', function(){ $$('dl.tabs').each(function(tabs){ new JTabs(tabs, {}); }); });
      window.addEvent('domready', function() {

         SqueezeBox.initialize({});
         SqueezeBox.assign($$('a.modal'), {
            parse: 'rel'
         });
      });
      window.addEvent('domready', function() {

         SqueezeBox.initialize({});
         SqueezeBox.assign($$('a.modal-button'), {
            parse: 'rel'
         });
      });
         function isBrowserIE() {
            return navigator.appName=="Microsoft Internet Explorer";
         }

         function jInsertEditorText( text, editor ) {
            if (isBrowserIE()) {
               if (window.parent.tinyMCE) {
                  window.parent.tinyMCE.selectedInstance.selection.moveToBookmark(window.parent.global_ie_bookmark);
               }
            }
            tinyMCE.execInstanceCommand(editor, 'mceInsertContent',false,text);
         }

         var global_ie_bookmark = false;

         function IeCursorFix() {
            if (isBrowserIE()) {
               tinyMCE.execCommand('mceInsertContent', false, '');
               global_ie_bookmark = tinyMCE.activeEditor.selection.getBookmark(false);
            }
            return true;
         }
      function jSelectArticle(id, title, catid, object) {
         var tag = '<a href='+'"index.php?option=com_content&amp;view=article&amp;catid='+catid+'&amp;id='+id+'">'+title+'</a>';
         jInsertEditorText(tag, 'vendor_store_desc');
         SqueezeBox.close();
      }
         function insertReadmore(editor) {
            var content = tinyMCE.get('vendor_store_desc').getContent();
            if (content.match(/<hr\s+id=("|')system-readmore("|')\s*\/*>/i)) {
               alert('Ya existe una etiqueta Leer más... el vínculo ha sido insertado. Sólo uno de esos vínculos está permitido. Use {pagebreak} para dividir la página aún más.');
               return false;
            } else {
               jInsertEditorText('<hr id="system-readmore" />', editor);
            }
         }
         
         function isBrowserIE() {
            return navigator.appName=="Microsoft Internet Explorer";
         }

         function jInsertEditorText( text, editor ) {
            if (isBrowserIE()) {
               if (window.parent.tinyMCE) {
                  window.parent.tinyMCE.selectedInstance.selection.moveToBookmark(window.parent.global_ie_bookmark);
               }
            }
            tinyMCE.execInstanceCommand(editor, 'mceInsertContent',false,text);
         }

         var global_ie_bookmark = false;

         function IeCursorFix() {
            if (isBrowserIE()) {
               tinyMCE.execCommand('mceInsertContent', false, '');
               global_ie_bookmark = tinyMCE.activeEditor.selection.getBookmark(false);
            }
            return true;
         }
      function jSelectArticle(id, title, catid, object) {
         var tag = '<a href='+'"index.php?option=com_content&amp;view=article&amp;catid='+catid+'&amp;id='+id+'">'+title+'</a>';
         jInsertEditorText(tag, 'vendor_terms_of_service');
         SqueezeBox.close();
      }
         function insertReadmore(editor) {
            var content = tinyMCE.get('vendor_terms_of_service').getContent();
            if (content.match(/<hr\s+id=("|')system-readmore("|')\s*\/*>/i)) {
               alert('Ya existe una etiqueta Leer más... el vínculo ha sido insertado. Sólo uno de esos vínculos está permitido. Use {pagebreak} para dividir la página aún más.');
               return false;
            } else {
               jInsertEditorText('<hr id="system-readmore" />', editor);
            }
         }
         
            var MaelstromHeader = {
               delay: 7000,
               duration: 50000,
               transition: Fx.Transitions.Quad.easeInOut,
               vdir: 'topdown',
               hdir: 'rtl'
            };
         
window.addEvent("domready", function() {
            new ScrollModules('rt-showcase', {duration: 600, transition: Fx.Transitions.Expo.easeInOut, autoplay: 0, delay: 5000});
new ScrollModules('rt-feature', {duration: 600, transition: Fx.Transitions.Expo.easeInOut, autoplay: 0, delay: 5000});
new ScrollModules('rt-bottom', {duration: 600, transition: Fx.Transitions.Expo.easeInOut, autoplay: 0, delay: 5000});

         });
window.addEvent('domready', function() {new GantrySmartLoad({'offset': {'x': 200, 'y': 200}, 'placeholder': '/templates/rt_maelstrom_j16/images/blank.gif', 'exclusion': ['ul.menutop,div.roktabs-wrapper,span.image,div.fusion-submenu-wrapper,.module-content ul.menu .image,.roknewspager-div a,#rokintroscroller,.feature-block .image-full, .controls .up, .controls .down, .rt-gallery']}); });
InputsExclusion.push('.content_vote','#rt-popup','#vmMainPage')
            window.addEvent('domready', function() {
                new Fusion('ul.menutop', {
                    pill: 0,
                    effect: 'slide and fade',
                    opacity:  1,
                    hideDelay:  500,
                    centered:  0,
                    tweakInitial: {'x': -10, 'y': -13},
                    tweakSubsequent: {'x':  0, 'y':  0},
                    tweakSizes: {'width': 20, 'height': 20},
                    menuFx: {duration:  300, transition: Fx.Transitions.Circ.easeOut},
                    pillFx: {duration:  400, transition: Fx.Transitions.Back.easeOut}
                });
            });
           
window.addEvent('domready', function() {
});
window.addEvent('load', function() {
});

function keepAlive() {   var myAjax = new Request({method: "get", url: "index.php"}).send();} window.addEvent("domready", function(){ keepAlive.periodical(840000); });
  </script>
  <script type="text/javascript" src="http://www.bionaturapets.com/media/editors/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
   <script type="text/javascript">
            tinyMCE.init({
               // General
               directionality: "ltr",
               editor_selector : "mce_editable",
               language : "es",
               mode : "specific_textareas",
               skin : "default",
               theme : "advanced",
               // Cleanup/Output
               inline_styles : true,
               gecko_spellcheck : true,
               entity_encoding : "raw",
               extended_valid_elements : "hr[id|title|alt|class|width|size|noshade|style],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|style],a[id|class|name|href|target|title|onclick|rel|style]",
               force_br_newlines : false, force_p_newlines : true, forced_root_block : 'p',
               invalid_elements : "script,applet,iframe",
               // URL
               relative_urls : true,
               remove_script_host : false,
               document_base_url : "http://www.bionaturapets.com/",
               // Layout
               content_css : "http://www.bionaturapets.com/templates/system/css/editor.css",
               // Advanced theme
               theme_advanced_toolbar_location : "top",
               theme_advanced_toolbar_align : "left",
               theme_advanced_source_editor_height : "550",
               theme_advanced_source_editor_width : "750",
               theme_advanced_resizing : true,
               theme_advanced_resize_horizontal : false,
               theme_advanced_statusbar_location : "bottom", theme_advanced_path : true
            });
            </script>
</head>



The 2 first sentences:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
  <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js" type="text/javascript"></script>

will not work, because my hosting block http and https traffic from my website... I don´t know where is loading this code.
As you can see, my joomla template doesn´t load any jquery.js...

Disabling the Use jquery virtuemart, don´t works for me.


Best regards.

nebular

#9
Quote from: spacialek on December 30, 2011, 22:18:31 PM


Here is the way I did:
I downloaded the jQuery file here: http://code.jquery.com/jquery-1.7.1.min.js and placed it in my "js" template directory.
Then I inserted the jQuery script in my index.php just before the
<jdoc:include type="head" />

So all together it looks like this:

<head>
  <script language="javascript" type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template;?>/js/jquery-1.7.1.min.js"></script>
  <jdoc:include type="head" />
</head>


This is for a Joomla 1.5 template, but I guess it's similar for Joomla 1.7


I did this solution, but don´t works for me. I copy this js file to this path : /templates/rt_maelstrom_j16/js

then I write this setence : <script language="javascript" type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template;?>/js/jquery-1.7.1.min.js"> in index.php of my joomla template and finally I disable Jquery of Virtuemart and don´t work, and worst. Because when a select other country and reselect Spain the doesn´t load the list os states.

There is something wrong in virtuemart with this version, with the 1.9.8M versión worked fine...



Thanks in advance, I hope that we can fix this error...

morktron

I've got the same issue and only have once instance of jQuery, I get the following error:

$(".virtuemart_country_id").vm2front is not a function

Any ideas?

kingb

same here - bump it up.... I've also got jquery 1.7.1 loaded by my template and early up in the head