fido-x wrote:In the template files for some of your modules (latest, featured, special) and some of the product related files (category, manufacturer, special, search, compare), you will find the following (somewhere within each file):
Code: Select all
<a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><span><?php echo $button_cart; ?></span></a>
Replace with:
Code: Select all
<?php if ($this->customer->isLogged()) { ?><a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><span><?php echo $button_cart; ?></span></a><?php } ?>
And, in the product template file, find:
Code: Select all
<a id="button-cart" class="button"><span><?php echo $button_cart; ?></span></a>
and replace with:
Code: Select all
<?php if ($this->customer->isLogged()) { ?><a id="button-cart" class="button"><span><?php echo $button_cart; ?></span></a><?php } ?>
hi guys
thank you Fido-x, i used it and it was great
one thing more i like to add to help
because this changes used for guests of the website, which in my case (resellers only website)
another thing must be done
removing add to wishlist, because simply its not useful (guest must login to see it)
with help fido-x code above, i make add to wishlist become Request quote, that direct guest to contact form
lets start .....
first
replace:
Code: Select all
<a onclick="addToWishList('<?php echo $product['product_id']; ?>');"><?php echo $button_wishlist; ?></a>
in most pages fido-x mentioned above with:
Code: Select all
<?php if (!$this->customer->isLogged()) { ?>
<a href="<?php echo $contact; ?>">request quote</a>
<?php } else { ?>
<a onclick="addToWishList('<?php echo $product['product_id']; ?>');"><?php echo $button_wishlist; ?></a>
<?php } ?>
then you have to go to controllers/product and add this to all .php anywhere:
Code: Select all
$this->data['contact'] = $this->url->link('information/contact');
you should do more changes if your website is multilanguage
again I'm not coder ore in IT business at all, but guys here are so great, and make it easy for people like me
