Author Topic: Turning "Ask a question about this product" into a button image  (Read 5789 times)

art2

  • Beginner
  • *
  • Posts: 1
Turning "Ask a question about this product" into a button image
« on: November 24, 2008, 23:33:14 pm »
I am putting together an online catalog and I am wondering how I can turn the "Ask a question about this product" text into a click-able image button instead. I want to be able to have a "request a quote button".

Is this possible? What file do I need to change, and if you could give me a example parameter.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10377
  • VirtueMart Version: 3+
Re: Turning "Ask a question about this product" into a button image
« Reply #1 on: January 27, 2009, 14:07:56 pm »
I did the request a quote without adding a background image.

I just modified the language file

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

klutzon

  • Jr. Member
  • **
  • Posts: 319
  • Knuckles the Echidna
    • Rage3D
Re: Turning "Ask a question about this product" into a button image
« Reply #2 on: January 27, 2009, 16:56:25 pm »
Hey art,

This is really easy to do, if you know your HTML well and you can locate the code in the flypage template where the "Ask a question about this product" text appears. You simply replace the text in the <a> tag with the picture you'd like the button to be. Alternatively, you can alter the image of the "Add to Cart" button that Virtuemart uses or replace it with your own, and when you've got the button showing it will show your button instead.

Either way should suffice. :)

jawatech411

  • Beginner
  • *
  • Posts: 35
    • Screened Images
Re: Turning "Ask a question about this product" into a button image
« Reply #3 on: April 13, 2009, 20:54:10 pm »
Hey art,

This is really easy to do, if you know your HTML well and you can locate the code in the flypage template where the "Ask a question about this product" text appears. You simply replace the text in the <a> tag with the picture you'd like the button to be. Alternatively, you can alter the image of the "Add to Cart" button that Virtuemart uses or replace it with your own, and when you've got the button showing it will show your button instead.

Either way should suffice. :)

Are you referring to the code in the flypage where it says:
Code: [Select]
<?php echo $ask_seller ?>

 ::)I must be looking in the wrong place.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10377
  • VirtueMart Version: 3+
Re: Turning "Ask a question about this product" into a button image
« Reply #4 on: April 13, 2009, 21:01:03 pm »
The text is located in the language file.

Just go into administrtor/components/com_virtuemart/languages/shop/english.php


Look for the ask seller text, and put your image src code there instead
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

jawatech411

  • Beginner
  • *
  • Posts: 35
    • Screened Images
Re: Turning "Ask a question about this product" into a button image
« Reply #5 on: April 13, 2009, 21:52:42 pm »
oh cool thanks

jawatech411

  • Beginner
  • *
  • Posts: 35
    • Screened Images
Re: Turning "Ask a question about this product" into a button image
« Reply #6 on: April 13, 2009, 22:52:09 pm »
I inserted my img src code into the language file and the image shows up but there is a ugly background sticking out of the bottom. i looked at the source code and its using the joomla templates button class.

How do you git rid of the button class attribute for this image?

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10377
  • VirtueMart Version: 3+
Re: Turning "Ask a question about this product" into a button image
« Reply #7 on: April 13, 2009, 23:12:12 pm »
what template/theme are you using?

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

jawatech411

  • Beginner
  • *
  • Posts: 35
    • Screened Images
Re: Turning "Ask a question about this product" into a button image
« Reply #8 on: April 13, 2009, 23:17:03 pm »
I am using a modified version of redevo_blue

jawatech411

  • Beginner
  • *
  • Posts: 35
    • Screened Images
Re: Turning "Ask a question about this product" into a button image
« Reply #9 on: April 13, 2009, 23:28:27 pm »
this is a section of the final output code in my store.

Code: [Select]
<td><a class="button" href="/index.php?page=shop.ask&amp;flypage=flypage.tpl&amp;product_id=24&amp;category_id=10&amp;option=com_virtuemart&amp;Itemid=1">
<img src="http://screenedimagesinc.com/templates/redevo/images/quote.jpg"></a></td>

I need to figure out what elusive php code is assigning this link with the button class and eliminate it. I would just get rid of the button class all together in the templates' css file but then all my other buttons will look like crap.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10377
  • VirtueMart Version: 3+
Re: Turning "Ask a question about this product" into a button image
« Reply #10 on: April 14, 2009, 04:27:48 am »
shop.product_details sets up the ask seller

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

jawatech411

  • Beginner
  • *
  • Posts: 35
    • Screened Images
Re: Turning "Ask a question about this product" into a button image
« Reply #11 on: April 14, 2009, 20:46:53 pm »
I cant seem to find it anywhere. The file is shop.product_details.php?

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
Re: Turning "Ask a question about this product" into a button image
« Reply #12 on: April 14, 2009, 20:51:58 pm »
lines 334-336
Mark
All of My old mods are now available on my website.
Mark Callf Designs

If you like the work I've done for VM please fell free to Donate

Please Note: I am no longer actively developing or involved with VM development.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10377
  • VirtueMart Version: 3+
Re: Turning "Ask a question about this product" into a button image
« Reply #13 on: April 16, 2009, 16:30:25 pm »
/** Ask seller a question **/
$ask_seller_href = $sess->url( $_SERVER ['PHP_SELF'].'?page=shop.ask&amp;flypage='.@$_REQUEST['flypage']."&amp;product_id=$product_id&amp;category_id=$category_id" );
$ask_seller_text = $VM_LANG->_('VM_PRODUCT_ENQUIRY_LBL');
$ask_seller = '<a class="button" href="'. $ask_seller_href .'">'. $ask_seller_text .'</a>';
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

jawatech411

  • Beginner
  • *
  • Posts: 35
    • Screened Images
Re: Turning "Ask a question about this product" into a button image
« Reply #14 on: April 22, 2009, 21:08:48 pm »
thanks guys