Jump to content
Sign in to follow this  
Lapitop

Опции в модальном окне [РЕШЕНО]

Recommended Posts

Разобрался. Спасибо. Может кому пригодится

 

product.tpl

<a href="http://domen/<?php echo $heading_title; ?>#option<?php echo $option['product_option_id']; ?>">Варианты</a>
           <div id="option<?php echo $option['product_option_id']; ?>" class="modalDialog">
           <div>
           <a href="http://domen/<?php echo $heading_title; ?>#close" title="Закрыть" class="close">Выбрать</a>
           <h2>Варианты</h2>


<div class="option-image">
<?php foreach ($option['option_value'] as $option_value) { ?>
<div class ="option1">
<label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
<?php if ($option_value['price']) { ?>
(<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
<?php } ?>
</label>
<label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name'] . ($option_value['price'] ? ' ' . $option_value['price_prefix'] . $option_value['price'] : ''); ?>" /></label>
<input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" />
</div>
<?php } ?>
</div>
</div>



        </div>
        </div>



css



.modalDialog {
        position: fixed;
        font-family: Arial, Helvetica, sans-serif;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
                background: rgba(0,0,0,0.8);
        z-index: 99999;
        -webkit-transition: opacity 400ms ease-in;
        -moz-transition: opacity 400ms ease-in;
        transition: opacity 400ms ease-in;
        display: none;
        pointer-events: none;
    }

    .modalDialog:target {
        display: block;
        pointer-events: auto;
    }

    .modalDialog > div {
        width: 720px;
                height: 420px;
                overflow: auto;
        position: relative;
        margin: 10% auto;
        padding: 5px 20px 13px 20px;
        border:10px solid black;
                border-radius: 10px;
        background: #fff;
        background: -moz-linear-gradient(#fff, #999);
        background: -webkit-linear-gradient(#fff, #999);
        background: -o-linear-gradient(#fff, #999);
    }

    .close {
        background: #00d9ff;
        color: #000;
        line-height: 40px;
                width: 100px;
        font-size:16px;
                position: fixed;
        right:280px;
        text-align: center;
        top: 100px;
        
        text-decoration: none;
        font-weight: bold;
        -webkit-border-radius: 10px;
        -moz-border-radius: 10px;
        border-radius: 10px;
        -moz-box-shadow: 1px 1px 3px #000;
        -webkit-box-shadow: 1px 1px 3px #000;
        box-shadow: 1px 1px 3px #000;
    }

Share this post


Link to post
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
You are posting as a guest. If you have an account, please sign in.
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.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.