Author Topic: product enquiry modification (Ask seller info about current product)  (Read 83711 times)

mambo_no5

  • Beginner
  • *
  • Posts: 16
Re: product enquiry modification (Ask seller info about current product)
« Reply #15 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?

macallf

  • Hero Member
  • *****
  • Posts: 2411
    • Mark Callf Design
Re: product enquiry modification (Ask seller info about current product)
« Reply #16 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
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.

cchhita

  • Beginner
  • *
  • Posts: 10
Re: product enquiry modification (Ask seller info about current product)
« Reply #17 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

macallf

  • Hero Member
  • *****
  • Posts: 2411
    • Mark Callf Design
Re: product enquiry modification (Ask seller info about current product)
« Reply #18 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
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.

cchhita

  • Beginner
  • *
  • Posts: 10
Re: product enquiry modification (Ask seller info
« Reply #19 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

macallf

  • Hero Member
  • *****
  • Posts: 2411
    • Mark Callf Design
Re: product enquiry modification (Ask seller info about current product)
« Reply #20 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
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.

Shibumi

  • ** on hiatus **
  • Sr. Member
  • ****
  • Posts: 591
  • if it aint broke, there must be something wrong
    • Shibumi Design Studios
  • VirtueMart Version: 2.0.20b
Re: product enquiry modification (Ask seller info about current product)
« Reply #21 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
Jeff
=================================================
Scionergy.com - www.Scionergy.com
Scion Owners Club of Ottawa - www.ScionOwnersClubOttawa.ca
Capital Door Service - www.CapitalDoorService.com - VM2.0.20b, Joomla 2.5.11 PHP5.2.11 powered site

gspinos

  • Beginner
  • *
  • Posts: 5
Re: product enquiry modification (Ask seller info about current product)
« Reply #22 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.

macallf

  • Hero Member
  • *****
  • Posts: 2411
    • Mark Callf Design
Re: product enquiry modification (Ask seller info about current product)
« Reply #23 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
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.

gspinos

  • Beginner
  • *
  • Posts: 5
Re: product enquiry modification (Ask seller info about current product)
« Reply #24 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/

Pete01

  • Beginner
  • *
  • Posts: 15
Re: product enquiry modification (Ask seller info about current product)
« Reply #25 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

macallf

  • Hero Member
  • *****
  • Posts: 2411
    • Mark Callf Design
Re: product enquiry modification (Ask seller info about current product)
« Reply #26 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
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.

Soeren

  • Administrator
  • Sr. Member
  • *
  • Posts: 3106
  • VirtueMart Starter
    • virtuemart.net
Re: product enquiry modification (Ask seller info
« Reply #27 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
The future of eCommerce: VirtueMart & Joomla!
http://virtuemart.net

macallf

  • Hero Member
  • *****
  • Posts: 2411
    • Mark Callf Design
Re: product enquiry modification (Ask seller info about current product)
« Reply #28 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
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.

Drakossi

  • Beginner
  • *
  • Posts: 3
Re: product enquiry modification (Ask seller info about current product)
« Reply #29 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