Post by ccookie » Sat Apr 06, 2013 12:24 pm

Hello Folks

thanks in advance on this one

Hello folks, I am having a brain freeze at present.

The theme I am working with is using text links for the add to wishlist and compare and I wanted it to use buttons that are like the buttons for add to cart.

I am using sellya.

A quick play around with the inspect code functionality and I found if i view the Add to cart it reads:

<input type="button" value="Add to Cart" onclick="addToCart('145');" class="button">

AND IF I VEIW THE WISHLIST LINK IT READS
<a onclick="addToWishList('145');">Add To Shopping List</a>

AND WHEN I CHANGE THAT ON THE INSPECTOR TO

<input type="button" value="Add to Shopping List"a onclick="addToWishList('145');" class="button">

that shows the button

SO.... I WENT TO THE FILES AND

in the back end I have altered two files IN
catalog/view/theme/sellya/template/product/
1. product tpl
2.category tpl

MADE THESE CHANGES

in product.tpl
FROM
<div class="wishlist-compare"><a onclick="addToWishList('<?php echo $product_id; ?>');"><span class="wishlist"></span><?php echo $button_wishlist; ?></a>
&nbsp;&nbsp;&nbsp;&nbsp;<a onclick="addToCompare('<?php echo $product_id; ?>');"><span class="compare"></span><?php echo $button_compare; ?></a></div>
<?php if ($minimum > 1) { ?>
<div class="minimum"><?php echo $text_minimum; ?></div>
<?php } ?>

CHANGED TO

<div class="wishlist-compare"><input type="button" value="<?php echo $product_id; ?>')" id=button-wishlist" class="button-exclusive"/><span class="wishlist"></span><?php echo $button_wishlist; ?></a>
&nbsp;&nbsp;&nbsp;&nbsp;<a onclick="addToCompare('<?php echo $product_id; ?>');"><span class="compare"></span><?php echo $button_compare; ?></a></div>
<?php if ($minimum > 1) { ?>
<div class="minimum"><?php echo $text_minimum; ?></div>
<?php } ?>
</div>

AND

category.tpl
FROM
</div>
<div class="wishlist"><a onclick="addToWishList('<?php echo $product['product_id']; ?>');"><?php echo $button_wishlist; ?></a></div>
<div class="compare"><a onclick="addToCompare('<?php echo $product['product_id']; ?>');"><?php echo $button_compare; ?></a></div>
</div>

CHANGED TO
<div class="wishlist">
<input type="button" value="('<?php echo $product['product_id']; ?>" onclick="addToWishList('<?php echo $button_wishlist; ?>;" class=button"</a></div>
<div class="compare">
<input type="button" value="('<?php echo $product['product_id']; ?>" onclick="addToCompare('<?php echo $button_compare; ?>;" class=button"</a>
</div>

AND NOPE...NO BUTTON.

FOGGY EYED, I SUSPECT THERE ARE ERRORS IN MY CODE OR MAYBE THERE IS ANOTHER PLACE I NEED TO CHANGE OR ITS JUST A COOKIE ISSUE.

BUT ALL THE SAME... GOT BRAIN FREEZE NOW, MAYBE THERE IS AN ANGEL OUT THERE THAT CAN HELP ME.

THANKS.

APOLOGIES FOR THE CAPITALS THIS IS JUST TO SHOW A DIFFERENCE IN CODE TO TEXT.

THANKS IN ADVANCE.

Newbie

Posts

Joined
Sun Mar 24, 2013 4:22 pm

Post by butte » Sat Apr 06, 2013 1:23 pm

Proofread everything you did. For example, your [class=button"] has an unmated and consequently stray ["]. Be especially careful with semicolons; every ";" required must be there, as a onesie, not in twosies. Be sure that every opening tag has a mating closing tag, and be sure that every attribute opens and closes properly. You're typing machine-readable syntax, spelling, and punctuation which are intended for the machine, which will execute whatever it is told, and if that is gibberish or a nullity, then it will deliver gibberish or a nullity. "No button" from "button code" is a nullity.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am
Who is online

Users browsing this forum: No registered users and 9 guests