Hello everyone,
Is it possible to have a text like "log in to see prices" if prices only are shown for logged on users?
Regards,
Jonas
Is it possible to have a text like "log in to see prices" if prices only are shown for logged on users?
Regards,
Jonas
sure, where you want to put your text.?? home.?? header.??
try this:
try this:
Code: Select all
<h4><a href="http://yourstore.com/index.php?route=account/login">Login</a> to see prices</h4>
All about Crochet and Knitting, a Handicraft Store -> http://tulip-craft.com
I think he means that when not logged in instead of the price you see: "Please login for prices"
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
For category pages
open catalog/view/theme/your_theme/template/product/category.tpl
find
replace it with
you need to add "else" . this was for category pages similarly you can do for product page, modules etc
open catalog/view/theme/your_theme/template/product/category.tpl
find
Code: Select all
<?php if ($product['price']) { ?>
<div class="price">
<?php if (!$product['special']) { ?>
<?php echo $product['price']; ?>
<?php } else { ?>
<span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span>
<?php } ?>
<?php if ($product['tax']) { ?>
<br />
<span class="price-tax"><?php echo $text_tax; ?> <?php echo $product['tax']; ?></span>
<?php } ?>
</div>
<?php } ?>
Code: Select all
<?php if ($product['price']) { ?>
<div class="price">
<?php if (!$product['special']) { ?>
<?php echo $product['price']; ?>
<?php } else { ?>
<span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span>
<?php } ?>
<?php if ($product['tax']) { ?>
<br />
<span class="price-tax"><?php echo $text_tax; ?> <?php echo $product['tax']; ?></span>
<?php } ?>
</div>
<?php } else { ?>
<div class="price"><a href="http://yourstore.com/index.php?route=account/login"><?php echo "Login to see Price" ; ?></a></div>
<?php } ?>
Hi everyone
I am interested to get this Text shown in my theme : Basico, but the theme's Basico/template/product/category.tpl doesn't have :
Only has this similar:
The above code is nestled in this huge chunk where there's also another <div class="price"> further below -- under <div class="product-grid central_products">
So which Div Class = "price" coding should I insert the 2 lines under? I believe should be the 1st instance where its similar to the indicated in the replies here?
I am interested to get this Text shown in my theme : Basico, but the theme's Basico/template/product/category.tpl doesn't have :
Code: Select all
<?php if ($product['tax']) { ?>
<br />
<span class="price-tax"><?php echo $text_tax; ?> <?php echo $product['tax']; ?></span>
Code: Select all
<?php if ($product['price']) { ?>
<div class="price">
<?php if (!$product['special']) { ?>
<?php echo $product['price']; ?>
<?php } else { ?>
<span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span>
<?php } ?>
</div>
<?php } ?>
The above code is nestled in this huge chunk where there's also another <div class="price"> further below -- under <div class="product-grid central_products">
Code: Select all
<div class="product-list">
<?php foreach ($products as $product) { ?>
<div class="listp">
<?php if ($product['thumb']) { ?>
<a href="<?php echo $product['href']; ?>" class="simple_image img-prod" title=""> <span style="display: none;" class="category_zoom"><img src="catalog/view/theme/Basico/image/ico-zoom.png" alt="Zoom Picture" /></span> <img class="category_images_border" src="catalog/view/javascript/timthumb/timthumb.php?src=<?php echo $product['thumb']; ?>&h=130&w=180&zc=1" alt="<?php echo $product['name']; ?>" /></a>
<?php } ?>
<div class="product_info"> <span class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></span>
<div class="description"><?php echo $product['description']; ?></div>
<?php if ($product['price']) { ?>
[b] <div class="price">
<?php if (!$product['special']) { ?>
<?php echo $product['price']; ?>
<?php } else { ?>
<span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span>
<?php } ?>
</div>
<?php } ?>[/b]
<div class="category_add"><a onclick="addToCart('<?php echo $product['product_id']; ?>');"><img src="catalog/view/theme/Basico/image/add_icon.png" alt="add icon"/><?php echo $button_cart; ?></a></div>
<div class="category_details"><a href="<?php echo $product['href']; ?>"><?php echo $button_view; ?></a></div>
</div>
</div>
<?php } ?>
</div>
<div class="product-grid central_products">
<?php
$prod_cont = 0;
foreach ($products as $product) { ?>
<div class="item">
<div class="item_up"> <a href="<?php echo $product['href']; ?>" class="ptitle2 product_title1"><?php echo $product['name']; ?></a>
<?php if ($product['thumb']) { ?>
<div class="image"><a href="<?php echo $product['href']; ?>" class="simple_image" title=""> <span style="display: none;" class="zoom"><img src="catalog/view/theme/Basico/image/ico-zoom.png" alt="Zoom Picture" /></span> <img class="pimg" src="catalog/view/javascript/timthumb/timthumb.php?src=<?php echo $product['thumb']; ?>&h=143&w=195&zc=1" alt="<?php echo $product['name']; ?>" /></a></div>
<?php } ?>
<?php $text = $product['description'];?>
<div class="product_text"><?php echo $text; ?></div>
<?php if (!$product['special']) { ?>
[b]<div class="price"><?php echo $product['price']; ?></div>
<?php } ?>
<?php if ($product['special']) { ?>
<div class="saleblock"> <span class="price_sale"><?php echo $product['price']; ?></span><span class="price_onsale"><?php echo $product['special']; ?></span> </div>
<?php } ?>[/b]
</div>
<div class="add"><span><img src="catalog/view/theme/Basico/image/add_icon.png" alt="add icon"/><a onclick="addToCart('<?php echo $product['product_id']; ?>');"><?php echo $button_cart; ?></a></span></div>
<div class="details"><a href="<?php echo $product['href']; ?>"><?php echo $button_view; ?></a></div>
</div>
<?php if ($prod_cont==3) { ?>
<div class="clear"></div>
<?php } ?>
<?php } ?>
So which Div Class = "price" coding should I insert the 2 lines under? I believe should be the 1st instance where its similar to the indicated in the replies here?
No more using Apsona, as they are not updated.
- Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC
Who is online
Users browsing this forum: No registered users and 2 guests