Author Topic: VM ProductSnapShots - Text Link of Add To Cart Button  (Read 19667 times)

rowby

  • Jr. Member
  • **
  • Posts: 77
    • RowbyVille
VM ProductSnapShots - Text Link of Add To Cart Button
« on: October 08, 2009, 17:45:14 pm »
Hello all,


I am using the plugin and am getting a Text link saying "Add to Cart".

Properly configured should the plugin have an image that says add to cart?

An image link this one, for instance.

http://7dayslearningsystems.com/components/com_virtuemart/themes/default/images/add-to-cart_blue.gif

Thanks,

Rowby

Join me in Outer Space at:
http://www.rowbyville.com

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10404
  • VirtueMart Version: 3+
Re: VM ProductSnapShots - Text Link of Add To Cart Button
« Reply #1 on: October 08, 2009, 18:15:34 pm »
add the add to cart button css to your template file.

theme.css is not loaded on content pages
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

rowby

  • Jr. Member
  • **
  • Posts: 77
    • RowbyVille
Re: VM ProductSnapShots - Text Link of Add To Cart Button
« Reply #2 on: October 08, 2009, 19:47:53 pm »
Hi

Thanks for helping me with this.

I tried putting the code from theme.css to my template css, per the below snippet but it didn't affect anything. 

Here is the link to the page:
http://7dayslearningsystems.com/

You'll see the text link right below the blue book cover on the left side of the page.

Below is a snippet from my template_css.css  file from the default joomla template that I am using.

Any thoughts?

Thanks

...Rowby
Code: [Select]

/* General Shop Styles here please */
.addtocart_button, .notify_button {
text-align:center;
background-position:bottom left;
width:160px;
height:30px;
cursor:pointer;
border: none;
font-weight:lighter;
font-family:inherit;
vertical-align: middle;
overflow:hidden;
font-size: 0%;
}
.addtocart_button {
background: url( 'http://7dayslearningsystems.com/components/com_virtuemart/themes/default/images/add-to-cart_blue.gif' ) no-repeat  center transparent;
}
.notify_button {
background: url( 'http://7dayslearningsystems.com/components/com_virtuemart/themes/default/images/notify_blue.gif' ) no-repeat  center transparent;
}
.addtocart_button_module {
text-align:center;
background-position:bottom left;
width:160px;height:30px;
cursor:pointer;
color: #000000;
border: none;
font-weight:bold;
font-family:inherit;
background: url( 'images/transparent.gif' ) no-repeat  center transparent;
vertical-align: middle;
overflow:hidden;

}

input.addtocart_button_module:hover  {
color: #d01313;
}

.addtocart_form {
width: 100%;
display: inline;
white-space: nowrap;
}
Join me in Outer Space at:
http://www.rowbyville.com

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10404
  • VirtueMart Version: 3+
Re: VM ProductSnapShots - Text Link of Add To Cart Button
« Reply #3 on: October 08, 2009, 20:00:57 pm »
try this in template.css


td.addtocart{
   background: url( 'http://7dayslearningsystems.com/components/com_virtuemart/themes/default/images/add-to-cart_blue.gif' ) no-repeat  center transparent;
}
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

rowby

  • Jr. Member
  • **
  • Posts: 77
    • RowbyVille
Re: VM ProductSnapShots - Text Link of Add To Cart Button
« Reply #4 on: October 08, 2009, 20:30:37 pm »
Hi BanquetTables.pro

Thanks for helping.  Getting close. I removed the other code and just put your code in template_css.css


td.addtocart{
   background: url( 'http://7dayslearningsystems.com/components/com_virtuemart/themes/default/images/add-to-cart_blue.gif' ) no-repeat  center transparent;
}

The button is now showing but the text link is showing behind it.  And I'm not sure what is creating the link -- the button or the text link.

ANy thoughts on fine tuning this?

:)

...Rowby
Join me in Outer Space at:
http://www.rowbyville.com

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10404
  • VirtueMart Version: 3+
Re: VM ProductSnapShots - Text Link of Add To Cart Button
« Reply #5 on: October 08, 2009, 21:18:46 pm »
look in your templates/common/productsnapshot.tpl

J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10404
  • VirtueMart Version: 3+
Re: VM ProductSnapShots - Text Link of Add To Cart Button
« Reply #6 on: October 08, 2009, 21:22:26 pm »
or you could try another line in css

td.addtocart a:link{ display:none}
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

rowby

  • Jr. Member
  • **
  • Posts: 77
    • RowbyVille
Re: VM ProductSnapShots - Text Link of Add To Cart Button
« Reply #7 on: October 09, 2009, 14:20:18 pm »
look in your templates/common/productsnapshot.tpl

Hi BanuetTables.pro -- I will probably do the display:none, but tell me what subfoldedrs the productsnapshot.tpl is in.  I can't seem to find it in the virtuemart main folders.

Thanks

Rowby
Join me in Outer Space at:
http://www.rowbyville.com

rowby

  • Jr. Member
  • **
  • Posts: 77
    • RowbyVille
Re: VM ProductSnapShots - Text Link of Add To Cart Button
« Reply #8 on: October 09, 2009, 14:32:08 pm »
Hi,

Okay I found it in the themes default subfolder....

Not sure what to modify in that template however, to get the article to show the button.   

For some reason display:none did not work.  I even tried changing the color in the style to white and that didn't work -- it's almost as if the style is not linking to the text portion of the button at all.

Code: [Select]
<?php if( !defined'_VALID_MOS' ) && !defined'_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' ); ?>
 
 <?php if( $show_product_name ) : ?>
<span style="font-weight:bold;"><?php echo $product_name ?></span>
<br />
<?php endif; ?>

<a title="<?php echo $product_name ?>" href="<?php echo $product_link ?>">
<?php
// Print the product image or the "no image available" image
echo ps_product::image_tag$product_thumb_image"alt=\"".$product_name."\"");
?>

</a>
<br />

<?php
if( !empty($price) ) {
echo $price;
}
?>

<?php
if( !empty($addtocart_link) ) {
?>

<br />
<form action="<?php echo  $mm_action_url ?>index.php" method="post" name="addtocart" id="addtocart">
    <input type="hidden" name="option" value="com_virtuemart" />
    <input type="hidden" name="page" value="shop.cart" />
    <input type="hidden" name="Itemid" value="<?php echo ps_session::getShopItemid(); ?>" />
    <input type="hidden" name="func" value="cartAdd" />
    <input type="hidden" name="prod_id" value="<?php echo $product_id?>" />
    <input type="hidden" name="product_id" value="<?php echo $product_id ?>" />
    <input type="hidden" name="quantity" value="1" />
    <input type="hidden" name="set_price[]" value="" />
    <input type="hidden" name="adjust_price[]" value="" />
    <input type="hidden" name="master_product[]" value="" />
    <input type="submit" class="addtocart_button_module" value="<?php echo $VM_LANG->_('PHPSHOP_CART_ADD_TO'?>" title="<?php echo $VM_LANG->_('PHPSHOP_CART_ADD_TO'?>" />
    </form>
<br />
<?php
}
?>

Join me in Outer Space at:
http://www.rowbyville.com

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10404
  • VirtueMart Version: 3+
Re: VM ProductSnapShots - Text Link of Add To Cart Button
« Reply #9 on: October 09, 2009, 14:44:31 pm »
Backup that file,and try this out. Replace this
<input type="submit" class="addtocart_button_module" value="<?php echo $VM_LANG->_('PHPSHOP_CART_ADD_TO') ?>" title="<?php echo $VM_LANG->_('PHPSHOP_CART_ADD_TO') ?>" />


with this
Try this one first

input type="submit" class="browseAddToCartContainer" value="<?php echo $VM_LANG->_('PHPSHOP_CART_ADD_TO') ?>" title="<?php echo $VM_LANG->_('PHPSHOP_CART_ADD_TO') ?>" />


If that does not work, try this

<input type="submit" value="<img src="/components/com_virtuemart/themes/default/images/add-to-cart_blue.gif" alt="<?php echo $VM_LANG->_('PHPSHOP_CART_ADD_TO') ?>" />
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

rowby

  • Jr. Member
  • **
  • Posts: 77
    • RowbyVille
Re: VM ProductSnapShots - Text Link of Add To Cart Button
« Reply #10 on: October 09, 2009, 17:35:14 pm »
Hi

Will try and report back -- a little later today.

Thanks

Rowby
Join me in Outer Space at:
http://www.rowbyville.com

rowby

  • Jr. Member
  • **
  • Posts: 77
    • RowbyVille
Re: VM ProductSnapShots - Text Link of Add To Cart Button
« Reply #11 on: October 10, 2009, 17:43:39 pm »
Hi BanquetTables,

We'll I tried both mods to productsnapshot.tpl.php

But neither made a difference.

I am also using this in the style sneet -- of course this mod turns off the text link completely, which is not good.

.addtocart a{
        display:none;
)

I notice that on the Virtuemart product pages the html shows a complete form.  I assume I cannot just paste the form info below the product on a non-virtuemart page, such as the home page that I am trying to add the Addto cart button


form name="order" method="get" action="http://7dayslearningsystems.com/index.php">
<input type="hidden" value="27" name="Itemid"/>
<input type="hidden" value="com_virtuemart" name="option"/>
<input type="hidden" value="shop.browse" name="page"/>
<input type="hidden" value="1" name="category_id"/>
<input type="hidden" value="0" name="manufacturer_id"/>
<input type="hidden" value="" name="keyword"/>
<input type="hidden" value="" name="keyword1"/>
<input type="hidden" value="" name="keyword2"/>
</form>
Join me in Outer Space at:
http://www.rowbyville.com

rowby

  • Jr. Member
  • **
  • Posts: 77
    • RowbyVille
Re: VM ProductSnapShots - Text Link of Add To Cart Button
« Reply #12 on: October 10, 2009, 17:54:52 pm »
Hi BanquetTables,

We'll I tried both mods to productsnapshot.tpl.php

But neither made a difference.  I am posting a link to this thread at the author's website.  However it is in Italian and I only speak English. 

http://www.simpleweb.it/plugin/24-add-to-cart-button-instead-of-text-link-for.html#24

??????

Rowby
Join me in Outer Space at:
http://www.rowbyville.com

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10404
  • VirtueMart Version: 3+
Re: VM ProductSnapShots - Text Link of Add To Cart Button
« Reply #13 on: October 10, 2009, 18:55:02 pm »

.browseAddToCartContainer {
   background: url( '/components/com_virtuemart/themes/default/images/add-to-cart_blue.gif' ) no-repeat  center transparent;
}

You have to change the css
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

rowby

  • Jr. Member
  • **
  • Posts: 77
    • RowbyVille
Re: VM ProductSnapShots - Text Link of Add To Cart Button
« Reply #14 on: October 10, 2009, 21:50:17 pm »
Hi

Changed the CSS to the template.  The add to cart button is showing nicely -- but the only way the link to the cart works is if I get rid of display:none -- but then that shows the text link.

So the only solution it seems is to get to the HTML where that add to cart image resides and somehow fix it there??? 
Join me in Outer Space at:
http://www.rowbyville.com