VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Development Projects, Modifications, Hacks & Tweaks. VM1.1 => Topic started by: macallf on April 06, 2006, 01:32:02 am

Title: product enquiry modification (Ask seller info about current product)
Post by: macallf on April 06, 2006, 01:32:02 am
Hi,

Someone asked for this kind of functionality in another post.

They did not want to have a mailto link on the product page for asking questions.

This mod is based on the joomla contact form, with the same kind of security measures (I hope!). Although I have no way of testing this.

The images below, although muddled, should show what I mean. One file needs modifying in the html directory and your flypage needs amending with another placeholder. This means that you can limit questions to certain categories using your product flypages. Three extra files are added.

in html/shop.product_details.php after

Code: [Select]
/** AVAILABILITY **/
  // This is the place where it shows:
  // Availability: 24h, In Stock: 5 etc.
  // You can make changes to this functionality in the file: classes/ps_product.php
  if( @$_REQUEST['output'] != "pdf" )
    $product_availability = $ps_product->get_availability($product_id);

add

Code: [Select]
//
// Ask seller question
$ask_seller = "";
    $ask_seller = "<a class=\"button\" href=\"$mosConfig_live_site/index.php?option=com_virtuemart&page=shop.ask&flypage=".@$_REQUEST['flypage']."&product_id=$product_id&category_id=$category_id&set=1&Itemid=$Itemid\">";
    $ask_seller .= "Enquiry Form</a>";

and near the end of the file after

Code: [Select]
$template = str_replace( "{product_packaging}", $product_packaging, $template ); // Changed Packaging

add

Code: [Select]
$template = str_replace( "{ask_seller}", $ask_seller, $template ); // Changed Packaging
in your flypage add a placeholder where you would like the enquiry form button added i.e. {ask_seller}
(I have included a flypage called flypage_ask.php this should explain what I mean).

unzip the attached files into administrator/components/com_virtuemart

these are new files and will not overwrite anything.

in virtuemart, click on admin and then modules, list modules. Locate the module named SHOP to the right of this under functions click on LIST. Here you will find a list of functions related to the shop. Click on NEW to add a new function.
Enter these Details:

Function Name:     productAsk
Class Name:              ps_ask
Class Method:             mail_question
Function Perms:         admin,storeadmin,shopper,demo
Function Description:  Enquiry form modification

This sets up the function to work within virtuemart.

in html/templates/order_emails there is a new file called enquiry_email.php

This is the html template for the enquiry form sent to the shop admin.
The customer recieves a text email for confirmation.

If the shop is set to use text emails then thats what you'll get.

I hope this explains everything.

Mark

[attachment deleted by admin]

[attachment cleanup by admin]
Title: Re: product enquiry form modification (Ask seller info about current product)
Post by: MAD King on April 06, 2006, 08:18:40 am
Yeah, that's it.
Best work.

Thank you very very much.
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: macallf on April 06, 2006, 12:00:17 pm
Hi MAD King,

I hope the installation process was not as painful as it seems and I hope it is as seemless as I hoped.

Comments would be appreciated on it's use.

Mark
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: macallf on April 06, 2006, 13:26:49 pm
Just as an update.

The first mod allows anybody to request information on a product, some users may not want this.

This modified shop.ask.php file requires the user to be registered before allowing requests to be sent, if you are not registered a message appears saying 'please register to use this facility'.

to use just unzip into admimistrator/components/com_vetuemart/html and overwrite the original file.

Mark

[attachment cleanup by admin]
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: MAD King on April 07, 2006, 16:33:23 pm
Hey Mark,

damn good work, but I get an error when I try to send a email or question:

Error: Insufficient Access Rights. You do not have permission to execute productAsk


Title: Re: product enquiry modification (Ask seller info about current product)
Post by: macallf on April 07, 2006, 17:58:36 pm
Hi MAD King,

check the access rights of the function you creation in the shop module. (productAsk)

it should be 'admin,storeadmin,shopper,demo' but it should also work with 'none'.

Thats why you are geting the warning.

Mark
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: MAD King on April 07, 2006, 18:48:28 pm
Yes it was 'none'

But I do not receive a email.
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: macallf on April 07, 2006, 18:59:57 pm
Do you still get the Error: Insufficient Access Rights. You do not have permission to execute productAsk


if not try changing the email type to text in virtuemart front end and save config. Then try a test mail. Then change back to html mail and try a test again.

I was having problems with this, but this seemed to cure it.

Mark
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: MAD King on April 07, 2006, 19:18:52 pm
I can not send any mail. Either from joomla nor from Virtuemart.
I tried all 3 conf.

php mail function
Sendmail
SMTP Server

What's wrong now? It is driving me crazy.
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: macallf on April 07, 2006, 20:04:05 pm
Hi,

was your mail working before this mod?

This mod does nothing to the mail functions within joomla or virtuemart. It just sends mail through the vm mail interface. It doesn't change or alter anything!!

Are you running this on a web server, they should have the info you need to configure email.

Are you running on a test server on a local PC? Is it windows or linux?

I maybe able to help but I need the answers to these questions.

Mark
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: MAD King on April 08, 2006, 07:04:13 am
It is working now. Don't know why.

Thank you for your good hard work.
Title: Re: product enquiry modification (Ask seller info
Post by: Soeren on April 13, 2006, 10:13:37 am
This mod will be integrated in VirtueMart 1.1.0. I just have finished the adaption.

Thanks macallf, with some small modifications your mod is great!
What I didn't like was that the "ask page" was just an enhanced copy of the product details page. I just deleted that product details part from the file and it's much clearer now what the form is meant for: to send an enquiry.

What do you think about it?

ciao, Soeren
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: MAD King on April 13, 2006, 10:25:02 am
Soeren, what about the pic mod?
If I do not want to show a pic may the script doesnt show any blank pic or "no available picture" and not link to the bigger pic.

And also if I do have only a short description and not a long Product Details.... May you can make that the Product Details... link is not showing if empty?

Thnx
Title: Re: product enquiry modification (Ask seller info
Post by: Soeren on April 13, 2006, 12:56:56 pm
Isn't that a bit off-topic??
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: macallf on April 14, 2006, 02:22:13 am
Hi Soren

Any help I can provide is OK to me!

I'm glad the mod was of help

Mark
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: mambo_no5 on May 06, 2006, 02:15:11 am
When is 1.1 due to be release, as I'd like to see this add-on working?
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: macallf on May 06, 2006, 12:05:06 pm
When is 1.1 due to be release, as I'd like to see this add-on working?

This add-on does work in 1.0.4, soren has modified it for version 1.1 of virtuemart and will be included as standard.

For questions about that release I would contact soren

Mark
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: cchhita on May 21, 2006, 10:54:26 am
Hi,
This is an awesome component!!
I want to slightly mod it for my needs - I want it so it can be like a gift wish list.  So a user can come online and look at the products, and send an email to their partner or someone else to say that they liked a certain product on the site, and that is something they would like as a gift :)

The way its done at the moment is through the flypage, can it be converted to run off the browse page instead?
I am not using the flypage, because it is a few too many clicks to get to the products.

Any help on this would be appreciated.

Cheers
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: macallf on May 21, 2006, 22:15:09 pm
Hi,

to use it on the browse page instead of the details page copy the code from shop.product_details.php and insert it into shop.browse.php (the code that handles product enquiry).

To use it as send info to a friend, the mod would have to be modded to take the receipients email and not the store admins, probably not much else to change.

Mark
Title: Re: product enquiry modification (Ask seller info
Post by: cchhita on May 22, 2006, 00:25:01 am
Hi,
Thanks for your quick reply!

Yes I tried this change, but it still wont work.
I think it has something to do with the file path that needs changing in the shop.browse.php file.
I played with these paths for some time with no luck.
I will have another go at this and report back if i have any luck!

Thanks
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: macallf on May 22, 2006, 02:22:19 am
this line of code
Code: [Select]
$ask_seller = "<a class=\"button\" href=\"$mosConfig_live_site/index.php?option=com_virtuemart&page=shop.ask&flypage=".@$_REQUEST['flypage']."&product_id=$product_id&category_id=$category_id&set=1&Itemid=$Itemid\">";
needs to be changed to this.

Code: [Select]
$ask_seller = "<a class=\"button\" href=\"$mosConfig_live_site/index.php?option=com_virtuemart&page=shop.ask&flypage=".@$_REQUEST['flypage']."&product_id=". $db_browse->f("product_id") ."&category_id=$category_id&set=1&Itemid=".$_REQUEST['Itemid']."\">";

The reasons why, $product_id and $item_id are not defined in shop.browse

Hope this sorts out your problem.

Mark
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: Shibumi on May 23, 2006, 19:13:04 pm
this line of code
$ask_seller = "<a class=\"button\" href=\"$mosConfig_live_site/index.php?option=com_virtuemart&page=shop.ask&flypage=".@$_REQUEST['flypage']."&product_id=$product_id&category_id=$category_id&set=1&Itemid=$Itemid\">";

needs to be changed to this.

$ask_seller = "<a class=\"button\" href=\"$mosConfig_live_site/index.php?option=com_virtuemart&page=shop.ask&flypage=".@$_REQUEST['flypage']."&product_id=". $db_browse->f("product_id") ."&category_id=$category_id&set=1&Itemid=".$_REQUEST['Itemid']."\">";


The reasons why, $product_id and $item_id are not defined in shop.browse

Hope this sorts out your problem.

Mark

For those of us who could not read this post
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: gspinos on May 27, 2006, 14:31:43 pm
Hi Soren

Any help I can provide is OK to me!

I'm glad the mod was of help

Mark

Hi Mark,

I hope you can assist me.  After battling for the last hour or so with the permission problems described earlier, I am now getting an error

Fatal error: Call to undefined function: sessioncookiename() in /home/centuryw/public_html/cms/administrator/components/com_virtuemart/classes/ps_ask.php on line 81

I wonder if it's just me made a mess somewhere or is my server (shared hosted)   causing these problems.

The URL for your reference is at www.century-way.com/cms

Thanks in advance

Greg Spinos.
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: macallf on May 27, 2006, 16:43:38 pm


Hi Mark,

I hope you can assist me.  After battling for the last hour or so with the permission problems described earlier, I am now getting an error

Fatal error: Call to undefined function: sessioncookiename() in /home/centuryw/public_html/cms/administrator/components/com_virtuemart/classes/ps_ask.php on line 81

I wonder if it's just me made a mess somewhere or is my server (shared hosted)   causing these problems.

The URL for your reference is at www.century-way.com/cms

Thanks in advance

Greg Spinos.

sessioncookiename is a standard joomla function, why it is causing problems I do not know.

and as i can not see a link to the enquiry form on your site I,m ata bit of a loss to explain why!

Mark
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: gspinos on May 28, 2006, 03:07:13 am
Hi Mark,

Thanks for the prompt reply.  I thought I had manage to overcome this problem about 10 hours!! ago and have been battling with this and some other issues (in different areas) almost all night, as I try to deliver the system for Monday.  Anyway to cut it short,  my answer finally was to simply comment out the  line 81-87 inclusive.   


//         $sessionCookieName    = mosMainFrame::sessionCookieName();
//         // Get Session Cookie `value`
//         $sessioncookie       = mosGetParam( $_COOKIE, $sessionCookieName, null );
//
//         if ( !(strlen($sessioncookie) == 32 || $sessioncookie == '-') ) {
//            mosErrorAlert( _NOT_AUTH );
//         }

My guess with the hardening of all hosting companies' servers many PHP scripts don't work everywhere the same way, due to security concerns coming up all the time.

To be frank I haven't managed to test all areas of the system, so I am not sure if this will come back to haunt me later.

Hopefully this may help others having similar problems with sessioncookiename()

Anyway the script now works beautifully, I wonder though how could this be changed to include multiple products, which is more of the norm with trading companies and wholesale buyers.

The site now starts coming up nicely,  http://www.century-way.com/cms/component/page,shop.product_details/flypage,shop.flypage/product_id,20/category_id,10/manufacturer_id,0/option,com_virtuemart/Itemid,26/
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: Pete01 on September 06, 2006, 14:06:19 pm
Hi Thanks for this function, it's really perfect for what I'm trying to do, but everytime I run it I get an error like this...

Fatal error: Call to undefined function: moshash() in /home/fhlinux184/f/formulaonelotus.co.uk/user/htdocs/administrator/components/com_virtuemart/html/shop.ask.php on line 277
 
Could anyone shed some light on this?  Is there an easy way for me to define this function?

Thanks

Pete
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: macallf on September 06, 2006, 14:14:41 pm
moshash is a function of Joomla, why this is causing a problem I do not know.

I have just tested this on J! v1.0.11 and VM 1.0.6 and no problems!!

Maybe someone else has some ideas, because I have none.

Mark
Title: Re: product enquiry modification (Ask seller info
Post by: Soeren on September 06, 2006, 14:21:42 pm
The function mosHash is not existant in Mambo, but only in Joomla (funny, look at the prefix!).
It must be declared when using Mambo...

ciao, Soeren
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: macallf on September 06, 2006, 14:32:42 pm
so just before line 271

// set up required fields for virtuemart function

add this

if (!function_exists('mosHash')) {
/**
 * Provides a secure hash based on a seed
 * @param string Seed string
 * @return string
 */
function mosHash( $seed ) {
   return md5( $GLOBALS['mosConfig_secret'] . md5( $seed ) );
}
}

That I think will work!!! - But don't quote me on it.

Mark
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: Drakossi on October 10, 2006, 03:50:50 am
This is a very useful mod, is there any way you can instruct me on how I can add this functionality to the browse pages?  I am looking to replace the "Call for Price" button. 

[EDIT]
NM, sorry I didnt read page 2 ;)  I will give this a try for my browse template and if it was as easy to do as the flypage, it will be a snap, thanks.

[EDIT2]
I am a dummy or something, could you tell me where in shop.browse I should past the code you have above.  I have tried a few areas and the link {ask_seller} doesnt work.

Thanks,

D
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: Drakossi on October 11, 2006, 04:28:55 am
unzip the attached files into administrator/components/com_virtuemart

these are new files and will not overwrite anything.

Mark

Great mod, I finally got everything working, one problem though.  Your enquery zip file puts ps_ask in the wrong directory.  If you follow the instructions you give, it creates a 'class' subdirectory and drops the file there, the proper directory (at least with 1.07) is classes (not class).  I found this by turning on the debug option in vm and saw an error about not being able to run ps_ask.php once I moved the file into classes everything works. 

Not sure about your other zip file, but this is for anyone trying to get this to work with VM 1.07, it wont until you move ps_ask.php into the proper classes subdirectory [administrator\components\com_virtuemart\classes]
Title: Re: product enquiry modification (Ask seller info
Post by: tophe on November 05, 2006, 23:02:10 pm
Hi,
I don't know if this thread is still active...
and I have NOT loaded this mod because reading the thread I get the impression it is keyed to a product being viewed.

I would like to suggest an alternative approach which I would like to see... am considering writing a module, but don't want reinvent any wheels.

I would like to see an option in the menu block of the Virtue Mart module, say "Product Enquiry"
This would then present a page with some (configurable) intro text and a nicely laid out grid of chckboxes so that Visitor can select the products of interest and send the appropriate User  & Admin emails.

The array of checkboxes could also be configured - e.g Only Categories or fully exploded category/products each with it's own checkbox.

The page would also need a form for Visitor details - ie. not necessarily registered and all details of the enquiry should be stored and available to be viewed by Admin from back-end.

Just an idea - If anyone is interested, by way of simple example, I have (long ago) done a similar page here (it's an older ASP site). Because it uses Frames, to see the page click "Product Enquiry"  from the left menu.... http://www.buttbin.com (http://www.buttbin.com).

I would be interested to hear whether such a page is on the agenda at all... if not I may start work.

Cheers,
Chris
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: macallf on November 06, 2006, 01:58:37 am
You're right, this mod is designed to work with the current product.

The reason, it's a specific product enquiry asking for more info if it's not there.

What you're suggesting is not providing much info in the first place and sending it as it's required?

everything in my mod is there to start with it, just amend it as you see fit. You'll only have to parse all the categories, products. Create the grid of options and then add all the product_id's to the email.

In my mind you're just creating work for the store owner!!

If the majority of the relevant info is there in the first place, you wouldn't need a product enquiry list.

This seems to be an order leaflet request for comparison than a product enquiry function.

Just my opinion.

By the way, this mod is incorporated as standard in the next release of VM (1.1)

Mark

Title: Re: product enquiry modification (Ask seller info
Post by: tophe on November 06, 2006, 03:32:40 am
Thanks for response Mark.

The reason, it's a specific product enquiry asking for more info if it's not there.
...
If the majority of the relevant info is there in the first place, you wouldn't need a product enquiry list.

I do take your point... isn't it interesting how the human mind perceives language...?

Well, we found on the ButtBin site that, the enquiry page is more about QUALIIFIED sales leads... that is, when my brother responds, he knows which specific (or type of) products the PROSPECTive customer is interested in.

That is, it is not simply a question of product information as such.

By the way, this mod is incorporated as standard in the next release of VM (1.1)

I will await VM 1.1 before any further action.

Thanks for VM and all the contributors thereof, it is a terrific effort and much appreciated by many of us out here.

Chris



Title: Re: product enquiry modification (Ask seller info
Post by: mariolosek on November 11, 2006, 22:17:15 pm
Could you show me the code if I want to have on Ask page not the whole product Information, but I have long descriptions on my site, so if I give the whole product information they will not see a form "Ask a seller" below. Could you tell me how to do that?

Thank you in advance for help
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: macallf on November 11, 2006, 22:54:13 pm
in shop.ask.php you'll find this code

$set = 0;
$more_images ="";
$file_list="";
$edit_link="";
$manufacturer_link="";
$product_weight="";
$product_reviews="";
$addtocart="";
$product_reviewform="";
$product_availability="";
$vendor_link="";
$product_type="";
$related_product_html="";
$product_packaging="";

this is a list of the item you want blanked out from the template, below that is the list of what is output
just add to the above list what you don't want displayed

Mark
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: Leq on December 04, 2006, 11:39:28 am
Hi,

I seem to have problems with the mailsending...None of the methods work.At least mosforms is sending mails in my installation, what is the method for sending mail in that case?
I have Joomla 1.0.7 and VM 1.0.7 installed.

Where is the destination address defined? in Shop details?
This function is THE reason I installed VM, so I really would like to get it working...


Title: Re: product enquiry modification (Ask seller info about current product)
Post by: Leq on December 04, 2006, 12:16:47 pm
Hi,

I seem to have problems with the mailsending...None of the methods work.At least mosforms is sending mails in my installation, what is the method for sending mail in that case?
I have Joomla 1.0.7 and VM 1.0.7 installed.

Where is the destination address defined? in Shop details?
This function is THE reason I installed VM, so I really would like to get it working...




I got one step further using Debug-mode. ps_ask.php was in a wrong folder, as it should be in classes folder, not class folder...

But now I get this error when posting:

Call to undefined function: sessioncookiename() in /xxxxxxi/public_html/administrator/components/com_virtuemart/classes/ps_ask.php on line 81


Edit:
That problem was solved on the second page, so we got it working! Thanks for a great mod!
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: Joschg on January 12, 2007, 20:35:14 pm
Thanks for nice component.

I have set it up and it works well for a site which is using the the catalog only and not shopping cart.

Title: Re: product enquiry modification (Ask seller info about current product)
Post by: Joschg on January 13, 2007, 00:41:05 am
I need to add phone number to the enquiry form, what pages do I need to amend.

How and where would I define and add
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: kessels1234 on February 13, 2007, 00:07:09 am
Hi mark,

Is it possible to open the form on a different page. Because if there is a lot info on the product, it presents the form at the bottom of the product-description. So i guess, a lot of people think nothing happened when they clicked the link and don't go down to the bottom of the screen.

Another question. Where do i modify all the translations; like: 'Enquiry Form' (our site is in dutch language).

Thnx for this grate mod.

Gr Danny
Title: Re: product enquiry modification (Ask seller info
Post by: david huang on February 13, 2007, 02:50:34 am
Yup~ That's what I want to ask, hopes your reply ,thanks Mark.
Title: Re: product enquiry modification (Ask seller info
Post by: perrine on June 11, 2007, 13:02:24 pm
Hello

I am sorry, but I don't find the module SHOP and I don't know how to add the function. Can you help me?
Thank you very much !
Perrine
Title: Re: product enquiry modification (Ask seller info
Post by: perrine on June 11, 2007, 13:08:45 pm
It is ok, excuse me fot the inconvenience ;(
Perrine
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: Lain_ on June 17, 2007, 01:28:21 am
Mark,   

You have another great feature I am attempting to use on my site. However after 4 attempts to get this one to work, well I still get the same error. It may have to do with how I am trying to implement it?

(http://i6.photobucket.com/albums/y218/calibratedsps/product_ask.jpg)

I have added tabs_and_sliders to my cart area, and currently I also use roks_members mambot to hide the slider so its only seen by logged in members to add product reviews like below. I am trying to get the info request to work like this product review slider, but for all guests not just members.


So, some questions are......
What do you think is causing the error message as shown above  ???

And....
Can this mod be made to scroll open and work like the product review without refreshing the page?

I am making a Fabrik form that I can use like this mod of yours, but Fabrik has "issues" of its own and currently the mambot they use is not playing friendly with Virtue-Mart. Plus with Fabrik I have not figured out how to auto-append the form with the product name and information. I know it can do it, but its a poorly documented component  and I have yet to make it work.


[attachment cleanup by admin]
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: macallf on June 17, 2007, 13:42:05 pm
You haven't followed the instructions on the first page of this thread!

Quote
n virtuemart, click on admin and then modules, list modules. Locate the module named SHOP to the right of this under functions click on LIST. Here you will find a list of functions related to the shop. Click on NEW to add a new function.
Enter these Details:

Function Name:     productAsk
Class Name:              ps_ask
Class Method:             mail_question
Function Perms:         admin,storeadmin,shopper,demo
Function Description:  Enquiry form modification

This sets up the function to work within virtuemart.

This has to be done to tell VM which function to use. The error states that the function doesn't exist so the above has not been done.

Mark

Title: Re: product enquiry modification (Ask seller info
Post by: Lain_ on June 18, 2007, 03:01:31 am
Quote
This has to be done to tell VM which function to use. The error states that the function doesn't exist so the above has not been done.

Actually, I did perform that task as the first thing I did before uploading the files. As per another post I read one problem I found is that the zip file puts ps_ask in the wrong directory, should be (classes) not (class). But anyway, I was quick to fix that problem.

Here is how I set up the module.

(http://i6.photobucket.com/albums/y218/calibratedsps/bot.jpg)

No matter how I configure it it still gives the same error.  :-\

I want a mod like this, but I have to say I really don't like the page refresh. Is there some way to tie into how the product review system knows what product your reviewing and make it a seem less function? It would just load as a function of the page creation.

If not, I will continue to use my Fabrik form project I am working with. Thanks again for your commitment to this project.
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: macallf on June 18, 2007, 04:48:39 am
You have set up a module not a function!

If you read my quote from the previous post it tells you exactly how to set up the function.

The screen will look like this, the function is added to the shop module.





[attachment cleanup by admin]
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: Bill on June 18, 2007, 19:11:46 pm
Hello,

I wasn't aware of this thread and I asked Marg Davison (who was the original author of Ask a Question) to help me with this.  The attached "ask_seller.zip" has the files and instructions for installing it.  It varies a little from Mark's mod, so I thought you might find it helpful.

All credit goes to Mark Callf and Marg Davison.

Bill

[attachment cleanup by admin]
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: Bill on June 18, 2007, 20:12:38 pm
I forgot to mention in the instructions included in the ask_seller.zip above that I made a style on my flypage.php file for the title on the ask page.  It calls for this style in the shop.ask.php file.  Add this to the top of flypage.php:

<style type="text/css">
<!--
.style5 {
   font-family: Verdana, Arial, Helvetica, sans-serif;
   font-size: 15px;
   font-weight: bold;
   color: #003366;
}
-->
</style>
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: Lain_ on June 28, 2007, 15:07:41 pm
Quote from: Mark
You have set up a module not a function!

Indeed, You are correct, I was not aware that Modules had a "2nd level" of configuration and so it was a bit confusing. Now I have learned some more about how Virtuemart works at a developer level.

I have it working now, but still wish it was a "smoother" operation.  :-\

My product flypage uses several mambots, and when you click the "request form" it reformats the flypage and all the {mambot_code} is shown on the form page. Its not very clean. (picture below)

It possible to have the form pop-up as a new window? Like the manufacturer popup...that I dont use.
Or have it be part of the flypage so it does not have to refresh to load the feature. I use a slider_mod to keep the product review form closed as a screen shot showed in one of my earlier postings.

I would be willing to pay for thit modification if its a fairly easy one for you to do.

Other wise I like it much better then the one I made using Fabrik....although the Fabrik one keeps those requests stored on my Fabrik interface so I can keep a log of product requests. Handy if the email does not come through properly.

Oh...and one more thing. If I want to replace the text link "request form" with a button "picture" where would I find that code  ??? I looked for about an hour but was confused as to what to edit.

Thanks again Mark for all your contributions.

[attachment cleanup by admin]
Title: Re: product enquiry modification (Ask seller info
Post by: tom on July 17, 2007, 21:44:51 pm
hello folks
is there a way to enable this "request more info" only on selected items.
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: nsw on August 12, 2007, 17:37:58 pm
hmm, i seem to have something wrong

i created the VM function as requested - see screen shot
moded flypage to include {ask_seller}
uploaded new classes and html files

just echos out on page ?
any ideas

[attachment cleanup by admin]
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: nsw on August 12, 2007, 17:56:56 pm
sorry, my fault - forgot to mod shop.product_details.php
working just fine now
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: nsw on August 14, 2007, 09:46:10 am
to avoid the lighbox tag {tag} echoing out onto the page make sure you call the virtuemart mambot code plugin before the template echo command in shop.ask.php

before

Code: [Select]
/* Finish and Print out the Page */
echo $template;

you need

Code: [Select]
// calls plugin code
global $_MAMBOTS;$_MAMBOTS->loadBotGroup( 'content' );$tmp_row = new stdClass();$tmp_params = new mosParameters('');$tmp_row->text = $template;$_MAMBOTS->trigger( 'onPrepareContent', array( &$tmp_row, &$tmp_params ), true );$template = $tmp_row->text;


make sure mambot is installed

 :)
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: jacksonbeale on October 28, 2007, 21:01:17 pm
Hi All,

Sounds like a great mod. Can anyone provide me with a working example? I assume that this sends an enquiry on a specific / series of specific products?

Jackson
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: MAD King on November 05, 2007, 10:15:35 am
macallf, I putted your great module in the new version of Virtuemart. I do have a question about a feature. Is it posible to let a pop up window open with the request form?

Right now I do get the form at the bottom of the articles and if a description is very long you would not see this form.

Thank you
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: kessels1234 on March 18, 2008, 23:29:29 pm
Hi,

does anybody have an answer to this?

I used the lightbox mod from Macallf and now in the inquirymod there is no picture. What to do to get a picture there?

Thanks in advance
Danny
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: Hermes on March 22, 2008, 15:20:30 pm
Thank you very much for that great mod!

It's working for me in Joomla 1.0.13 eCommerce edition.

Greetings!!
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: emicoma on March 24, 2009, 04:30:51 am
Hi,

I try to send this product enquiry form directly to the manufacturer or the product vendor.
I looked at all files concerned but cannot see where the destination email is stored.
It looked to be set in ps.communication but I am a bit lost.
All idea will be welcome.
I use jommla 1.5.9 and last vm version but I guess you will have idea on the subject.
thanks !
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: hariara on April 30, 2009, 10:25:10 am
I think this modification not applicable to Virtuemart 1.1.x as already included (Ask a question about this product button). But it will be interesting if there is an option instead of adding items into "shopping basket" it goes into "Inquiry Basket" with or without price (very useful these days, as people can negotiate pricing..)
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: suckids on July 10, 2009, 13:15:42 pm
Hii all ... I want to ask something about enquiry form, When I click on "Call For Pricing" Link, the form will comes up and in the Message form will write Product Name by default. My question is How to show Product SKU too by default ?

thanks,
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: frangarrob on June 14, 2010, 15:28:58 pm
How can I generate sh404sef friendly urls in "Ask seller a question" button.

In my store, the link for "ask seller" doesn't work properly. The form opens url like this one:

index.php?option=com_virtuemart&Itemid=80&category_id=26&flypage=flypage.tpl&lang=es&page=shop.ask&product_id=414
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: IntraX on September 04, 2010, 14:35:06 pm
For what do you need SEF Urls for this page? :) For the user to see a SEF Url? They do not care, for anything else it makes also no sense. Google does not care about this page and from what you can read on Google Blogs they like non SEF Urls even more then "SEF" Urls  ;D
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: kasssim on January 10, 2011, 08:42:28 am
is it possible to capture the email sent from product info page ?
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: muddauber on January 20, 2011, 02:01:01 am
Maccallf,

I know this is an old post, but I am getting some strange activity on my site and it comes from the "Product enquiry for Product Name" form or module. I don't have it listed anywhere on my site, but I am getting spam and hack attempts for the "product enquiry"

Is there a way for me to remove or turn this off on my VirtueMart site? I'm just using the standard VirtueMart, without any mods
at all.  thanx
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: Bruce Morgan on January 20, 2011, 16:58:46 pm
I saw this thread and wanted to post a sspamtion without reading all 60+ previous posts.  I went to some trouble to remove the "ask seller a quastion about this product" from my flypage.  It seems some people like this feature and would like to customize it. 

Is there some way you could takke all of the work you guys have done and make it user configurable from the admin backe end.  If that were done, this work could be added to the VM core and that would be one less hack that admins would need to add to their site.  I for one would like to see a day where I no longer need to hack the core code for any reason at all.

Bruce
www.pepper-passion.com
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: rhand-vm on May 25, 2011, 07:38:52 am
I saw this thread and wanted to post a sspamtion without reading all 60+ previous posts.  I went to some trouble to remove the "ask seller a quastion about this product" from my flypage.  It seems some people like this feature and would like to customize it. 

Is there some way you could takke all of the work you guys have done and make it user configurable from the admin backe end.  If that were done, this work could be added to the VM core and that would be one less hack that admins would need to add to their site.  I for one would like to see a day where I no longer need to hack the core code for any reason at all.

Bruce
www.pepper-passion.com

We are working on a product info pop-up and I found this thread. I agree it would be great to have this piece of code added to Virtuemart Core and have the possibility to adjust things from the backend. Are there any plans for this? Second, has anyone incorporated this in a pop-up yet?
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: mindfree_indian on June 08, 2011, 10:06:48 am
Thanks
Title: Re: product enquiry modification (Ask seller info about current product)
Post by: posenas on November 30, 2014, 18:41:21 pm
Hello Mark. Can you help me with the same question in virtuemart 3.0.0 ?