Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[req] items/products anywhere mod


Frold

Recommended Posts

I use phpbb and there there is a mod called Topics Anywhere (see a demo here http://forum.afsvlaanderen.be/topics_anywhere_force_eng.php - very user friendly) that basicly let your (it is much more advance then that) select from witch forum you would like to have a output and how you would the output to look. On behalf of you choices it generates a javascript like...

 

<script language="JavaScript" type="text/javascript" src="http://forum.afsvlaanderen.be/topics_anywhere_force_eng.php?mode=show&f=uMSwyLDMsNyw4LDksMTAsMTIsMTMsMTQsMTUsMTYsMTcsMTgsMTksMjAsMjEsMjIsMjMsMjQsM

jUsMjYsMjg%3D&n=10&sfn=y&fnl=y&r=y&sr=y&b=non&lpb=0&lpd=0&lpi=y"></script

 

then you place that on what site you want - not even you own site it could be on any homepage on the internet...

 

Is there a mod for oscommerce that let you offer the same..

 

If you do not understand I will try to explain....

 

Topic anywhere homepage:

http://www.afsvlaanderen.be/topics_anywher...wnload.php

Link to comment
Share on other sites

In fact that's something I am interested in as well. Basically it allows you to create a portal on another web site with a 'BUY NOW' button etc...

 

Very useful...

Exactly....The reason why I?m looking for a mod like that is because I would like a easy-to-use interface where I can select between all of my products, and on behalf of wich product I choose the mod will create a uniq code... That code I could place where I wont to...That would make it more easy to make portal or something like that...

Link to comment
Share on other sites

I might look at doing something like this myself once I have my shop running. Won't be for a couple of months though.

Okay... But I don?t understand why there doesn?t is a mod like that... I find it VERY usefull and in some way it must be very easy to make (I guess - because all the date is in the database )

 

 

/Frold

Link to comment
Share on other sites

To put a buy now button for any product from your site: go to an existing buy now button (you will have to have buy now enabled), right click, and select copy shortcut (in IE; copy link location in Mozilla); now go to where you want and use something like the following code (includes the buy now code in href=""):

<a href="http://www.oscommerce.com/osCommerce22ms2/index.php?cPath=3_10&sort=2a&action=buy_now&products_id=12" target="blank"><img src="http://www.oscommerce.com/osCommerce22ms2/images/dvd/die_hard_3.gif" border="0" alt="Die Hard With A Vengeance" title=" Die Hard With A Vengeance " width="100" height="80"></a>

I used the product image here, but you could put whatever you want to be your buy now link.

 

If you don't have Buy Now enabled for your product listings, you can get the same effect by copying the product_info link and adding &action=buy_now at the end.

 

Hth,

Matt

Link to comment
Share on other sites

Easiest way to do it is as follows

 

 

ob_start();
include(DIR_WS_MODULES . "product_listing.php");
$output = ob_get_contents();
ob_end_clean();

$parts = explode("\n", $output);

foreach($parts as $line)
{

$newline = str_replace("\r", "", $line);

 if (strlen($newline) != 0 && $newline != " " ) {
   print('document.write("' . addslashes($newline) . '");' . "\n");
 }
}

 

thats just an example piece of code you need need to display the html between the ob_start and end.

 

You then manipulate the output and display them as javascript document.write statements. Then they can be included as a javascript file.

 

 

A very simple example of this working is at:

 

 

http://www.highbarn-consulting.com/include_example.htm

 

 

if you look at the view source the whole content is produced with a javascript include.

 

Watch out for things such as the order of compression and things such as that when using output handlers.

Link to comment
Share on other sites

Easiest way to do it is as follows

 

 

ob_start();
include(DIR_WS_MODULES . "product_listing.php");
$output = ob_get_contents();
ob_end_clean();

$parts = explode("\n", $output);

foreach($parts as $line)
{

$newline = str_replace("\r", "", $line);

?if (strlen($newline) != 0 && $newline != " " ) {
? ?print('document.write("' . addslashes($newline) . '");' . "\n");
?}
}

 

thats just an example piece of code you need need to display the html between the ob_start and end.

Nice you wanna help!!! but I do not understand your "how to" where to place that code?

 

ob_start();

include(DIR_WS_MODULES.........

Link to comment
Share on other sites

Hmm... I to would like to know more info on this subject.

anyinfo on this?

nice to be able to place product anywhere on my site.... like mainpage.php

<span style='font-family:Courier'>If you can't fix it Perl it!!!...</span>

******************************

Link to comment
Share on other sites

Hmm... I to would like to know more info on this subject.

anyinfo on this?

nice to be able to place product anywhere on my site.... like mainpage.php

Yeah it would be very nice if someone made a powerfull mod!!

 

Or a HOWTO....

Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...