fresher
fresher

Reputation: 901

text is displaying below Add to cart button

please visit : link1 search for "Selling Price" using Ctrl + F.

you can see this text "Selling Price + Rs 50 Delivery" is displaying above "Add to cart" button. but in this link2 , its displaying below add to cart button. please help me to display "Selling Price + Rs 10 Delivery" text above "Add to cart" button....

we are using following code :

.product-view .product-essential .product-shop {

text-align : left;
position:relative;
padding-bottom:0px;

}

phtml

<?php
echo " Rs " . $_product->getData("mp_local_shipping_charge") .  " Delivery ";

    ?>
    <!-- shipping charges on product view pageee  -->

    <!-- 3 sshippng -->

    <?php $deliveryPrice = $_product->getData("mp_local_shipping_charge") ?>
    <?php if($deliveryPrice === "0"): ?>
        <p class="sell_price"><?php echo "Selling Price (Free Delivery )"; ?> </p>
    <?php elseif(empty($deliveryPrice)): ?>
        <p class="sell_price"><?php echo "Selling Price + Rs 50 Delivery "; ?> </p>
    <?php else: ?>
        <p class="sell_price"><?php echo "Selling Price"; ?>
        <?php echo "+ Rs " . $_product->getData("mp_local_shipping_charge") . " Delivery "; ?>
    <?php endif; ?>

enter image description here

Upvotes: 0

Views: 209

Answers (4)

Sharma Vikram
Sharma Vikram

Reputation: 2470

in paragraph class sell_price you can add this style

.sell_price{
 position: relative;
 margin-top: -44%;
}

O/P image

try this

 <?php 
     $style='style="position:relative;margin-top:-44%;"';
     ?>
     <?php $deliveryPrice = $_product->getData("mp_local_shipping_charge") ?>
        <?php if($deliveryPrice === "0"): ?>
            <p class="sell_price" <?=$style?>><?php echo "Selling Price (Free Delivery )"; ?> </p>
        <?php elseif(empty($deliveryPrice)): ?>
            <p class="sell_price" <?=$style?>><?php echo "Selling Price + Rs 50 Delivery "; ?> </p>
        <?php else: ?>
            <p class="sell_price" <?=$style?>><?php echo "Selling Price"; ?>
            <?php echo "+ Rs " . $_product->getData("mp_local_shipping_charge") . " Delivery "; ?>
        <?php endif; ?>

Upvotes: 1

Ralph John Galindo
Ralph John Galindo

Reputation: 1190

you forgot to end the <p> tag on your else statement

 <?php else: ?>
        <p class="sell_price"><?php echo "Selling Price"; ?>
        <?php echo "+ Rs " . $_product->getData("mp_local_shipping_charge") . " Delivery "; ?>
        </p>
    <?php endif; ?>

Upvotes: 1

ketan
ketan

Reputation: 19341

There is your p tag is after the product-options-bottom div.

<div class="product-options-bottom">
<p class="sell_price">Selling Price + Rs 10 Delivery </p>

Put p to before div tag same way in your first link p tag is before .add-to-box div

Upvotes: 1

Sumanta736
Sumanta736

Reputation: 705

I think the problem is your html code. In link 1 you place your paragraph tag after the div class="widget" but in link 2 its not there. so place your paragraph tag after that div.

Upvotes: 1

Related Questions