Hot answers tagged

8

There are a lot of ways to solve this problem, so the best one will be the one that works best with your code. Below is a basic example of how to redraw the map when a trigger is clicked. Essentially, when a tab or an accordion is clicked, the map goes from hidden to visible. If the map was hidden before it was totally initialized, it will not get rendered ...


8

What is the path to load the template in your browser, through EE (like a normal page on the EE site)? Did you try using that path, too? That would be the one I'd expect to work. You'd want to do this anyway if there are any EE tags in the template, to be sure they get parsed. If you try to access the URL of a template file directly with the browser you ...


7

It's a little tricky to help since I can't find a documentation page for the Allinone Thumbnail Banner jQuery plugin. But if I had to guess based on what the HTML output is supposed to look like, then these are the issues you are likely to be having: The first issue is that you are not closing your ul tag. It needs to be closed before you output your ...


5

UPDATE: Store 2 includes the fix mentioned below. It will be an option in the next version. In the meantime, you can fix it by opening mod.store.php, going down to about line 235, and changing this: (document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]).appendChild(script); to this: document.getElementsByTagName("body")[0]....


4

I've found a solution. I needed to get the map id from the generated script from MX Google Map. Didn't need to set the zoom either. Learning as I go! $('a[data-toggle="tab"]').on('shown', function (e) { for (var mapId in $.mxgoogleMaps.gMap) { google.maps.event.trigger($.mxgoogleMaps.gMap[mapId], 'resize'); }; }); // refire the map


4

... when the form fields are filled out correctly ExpressionEngine itself throws an "x Field Required" error message("Email Field Required" for the Comment Form ... The comment form code that you've posted includes a from field, not an email field. It seems pretty likely that EE is looking for $_POST['email'] and then bailing when it can't find it. The ...


4

Ok, here's the code: Javascript: $(function(){ $('.ajax_link').on('click', function(e){ // catch the click, and bind that click-event to the variable "e" e.preventDefault(); // stop the event from firing (so user doesn't get forwarded to the actual link) var elem = $(this), link = elem.attr('href'), target = ...


4

Store has built in dynamic price variables you can use. You can see all of the avilable variables here. You would want to use <span class="store_product_price"></span> To adjust the price when modifiers are changed.


4

Your issue is answered here I believe: https://stackoverflow.com/a/3066751/135935 I recently fixed the same problem by changing my CSS to use the off-left positioning suggested in the answer. Worked perfectly.


4

Answering my own question as I think this is useful. Adrian at Expresso helped me out. Basically, we output the menus and also output custom buttons. Then we just hide the menus with CSS. This presumably avoids writing lots of new custom Javascript or introducing new dependencies to the way the form is processed by Store. See this jsFiddle EE code {!-- ...


4

You can use {count} or {absolute_count}, instead of {entry_id}. {count} restart on every page, while {absolute_count} increases across pagination. By the way, 'tackbacks' isn't a value of the disable parameter.


4

This is not actually EE-related - your scripts are in the wrong order. You're calling your site_script before you've loaded jQuery: <script type="text/javascript" src="{template_root}site_script.js"></script> <!-- Bootstrap JQuery--> <script src="https://code.jquery.com/jquery.js"></script> Reverse the order of those and you ...


4

I'm sure there are many ways to handle jQuery and EE but in my experience, for frontend work I tend to not use the jQuery provided with EE and just link in the version that I want to use. I always place the main jQuery link in an included footer or header and when necessary I'll add script tags that are specific to a page at the bottom of the page template ...


3

What about: {modifiers} {modifier_name}: {modifier_options} <label><input type="radio" name="{modifier_input_name}" value="{option_id}" /> {option_name}</label> {/modifier_options} {/modifiers}


3

Posting the solution for future reference here. There were two parts to this problem. Firstly, it looks like the template partial which was being loaded via ajax had slightly different code than the main template, so for example was using {price} instead of {price_inc_tax}. This caused different price to be displayed for products loaded later on via AJAX. ...


3

I would do the same as Stuart McCoy, but performance wise it's better to use switchee instead of the native advanced conditionals. {exp:switchee variable = "{segment_2}" parse="inward"} {case value="pancakes"} {exp:channel:entries channel="pancakes" dynamic="off"} {title} {sn-pagination} {/exp:channel:entries} {/case} {case value="...


3

Try wrapping each channel entries and each pagination in a conditional. If the pagination layout is identical for each channel entry section then you can throw it in a snippet. It might look something like this: {if segment_2 == "pancakes"} {exp:channel:entries channel="pancakes"} {title} {sn-pagination} {/exp:channel:entries} {if:elseif segment_2 =...


3

This may not be the prettiest solution but, I got it working by removing the inline float:left and adding it to my css instead. Just to pass along, I wrote this jQuery to add mouse over functionality to swap product images, change the value of my select modifier, change the SKU and price on thumbnail mouseover. $(document).ready(function () { $(...


3

You're likely looking at the new docs that just went up, for EE 2.7 (released yesterday). Under EE 2.6.1, the parameter you want is called safecracker_head, not include_assets.


3

Instead of trying to catch links on the page (which won't work if the customer uses their back button etc), you should use the empty_cart="yes" parameter on the product tag. https://exp-resso.com/docs/product_tag.html#empty_cart {exp:store:product entry_id="{entry_id}" empty_cart="yes"} <!-- form here --> {/exp:store:product} This means the cart ...


3

Correct, just make the jQuery settings in the extension area to be a relative protocol: //ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js


3

update looks like this task is not so simple as looks like - can't find where some notice even is registered (like for save custom field setting - looks like it is flashdata). I made a quick example using HubSpot Messaging + ee_notice replacement as combination of JS & hooks - CP Notice before Why just don't replace it with ext.? function cp_js_end( ...


3

I found out what the issues are. The plugins simply haven't been updated for the most recent versions of EE. I use a different locations for my third_party folder. The url in most of these plugins look for the theme directory in the default location using this url: $this->EE->config->item('theme_folder_url').'third_party/plugin_folder_name But, ...


3

I've had this same problem. I solved it by simply using {if segment_1 == "abc"} statements to not include my jQuery on any page (segment) that had Channel Forms loading it's own jQuery. You can also overwrite the jQuery file that EE/Channel Form includes with your version of jQuery -- I have found EE's version to be slightly different to what I download ...


2

Your best bet is to construct your own data tables - see the DataTables site I have used DataTables to make multiple tables on a page - for example, my HooKan module has nine large tables on a page. Once you have had a look at how DataTables works, come back if you have any problems implementing


2

Probably not the specific implementation answer you want, but speaking generally, the sane way to do this is if you really feel the need is to store/cache this information per entry on entry publish/update, as: It ain't gonna change unless an entry save happens It's potentially computationally expensive to generate It's probably not the end of the world if ...


2

My specific issue was corrected by making sure that both the JavaScript files and the index file I was embedding them into were set to use the 'JavaScript' type. Earlier versions of ExpressionEngine would work with that index file set to other template types, but the latest versions are particular, and submit more strict headers with the templates.


2

Your problem is your selector: $('form#example-register input#register'). The submit event is tied to the form, not the submit button. Try changing your selector to $('form#example-register'). Also adding a console.log('submit') into the function is good to even see if the event is getting called. Also, while input[type="submit"] is accepted, IMO it's ...


2

Here is an example of how to fix the issue using jQueryUI Tabs. It could work with any other tab library, you just need to change the callback and the conditional. Basically you just need to get access to the Gmap instance in question and resize the map, and then re-center it. It's really simple. $(document).ready(function() { $('.tabs').tabs({ ...


2

Well, I guess there are several ways of doing this, one of them is finding a way to modify preferences window (target or similiar) of a link. But I found it much easer instruct clients to add css class to the link they make. They make a normal link to big image they want to open in modal window, and in Advanced tab they add special css class. Based on that ...


Only top voted, non community-wiki answers of a minimum length are eligible