News:

Support the VirtueMart project and become a member

Main Menu

Specifications if customer is on guest checkout

Started by kratzi, January 28, 2016, 19:50:54 PM

Previous topic - Next topic

kratzi

Hi I am running my test version on J. 3.4.8 VM 3.0.12

I would like to hide some divs or style them differently when a user wants to checkout as guest. So basically only if the customer has already entered a billing or shipping address.

I am trying with this:

<script>
if($(".output-billto span.values").html().length)
    {
    $(".billto-shipto").show();
    }
</script>


in my css I have

.billto-shipto {display:none;}


Unfortunately it is not working even though it works here: http://jsfiddle.net/WPf5f/68/
Basically if you delete the span it won't show the div. The idea is that if there is no span for email address as the customer did not enter one the whole div should not be shown.

Any idea how I could solve this.
Thank you

kratzi

kratzi

Here is the solution.

<script>
if(jQuery(".output-billto span.vm2-email").html().length)
    {
    jQuery(".billto-shipto").show();
    }
</script>


Regards