-
Posts
34 -
Joined
-
Last visited
Everything posted by Johno
-
?! special prices & AWB Quantity Price Breaks Per Produc
Johno replied to osik's topic in General Add-Ons Support
By that I meant is there a windows utility that will work with .diff & .patch files? Cheers, Johno -
:oops: Ahhh I see. I can't see any problem with that........................... Cheers, Johno
-
I'm not sure what you mean by calling card business? If It doesn't do what you need, let me know & I'll do whatever I can to help Cheers, Johno
-
I've created a contribution which allows you to sell a keycode - to unlock a trial piece of software perhaps ? the keycode will appear on screen @ checkout success & is also visible in order history. Get your copy here http://www.oscommerce.com/community/contributions,1430 while they're still hot. Cheers, Johno
-
?! special prices & AWB Quantity Price Breaks Per Produc
Johno replied to osik's topic in General Add-Ons Support
Greetings All, I was just wondering if anyone had modified this to work with MS2? Also, I'm having a bit of a nightmare trying to get my head around the .diff & .patch files. I'm on a windows machine here & ftp files to the web server, I don't have telnet access to the webserver so................. Is there any way I could implement the changes (easily) within a Windows environment? Cheers, Johno -
Done It ! <?php Header( 'Content-Type: text/xml' ); echo '<?xml version="1.0" ?>'; echo "<Disking>"; /* OSCommerce Product XML Feed by Kenny Boyd ([email protected]) http://www.theinternetfoundry.com This hack will provide a basic xml feed which can be polled by applications, affiliate websites or systems using other languages such as C++, Perl, .NET etc to display your product line in xml readable format. It is rehash of the excellent Catalog Anywhere addon programmed by: Patrick Veverka ([email protected]) available at: http://www.oscommerce.com/community/contributions,294 This is a real quick and dirty xml implementation so bugs may exist Please see the README.TXT before you use this */ //////////////////////////////////////////// // THE FOLLOWING OPTIONS MUST BE CONFIGURED! // 1. Configure DB Connection $db_server = "*****"; //database server $db_user = "*****"; //database user $db_pass = "*****"; //database password $db_name = "*****"; //database name // 2. Configure Site Info //Enter the url to your website //don't use any slashes or http eg: www.mysite.com $domain_name = "www.diskingcomputers.co.uk"; //Enter the directory name of your catalog //don't use any slashes eg: catalog $catalog_folder_name = ""; //no slashes // 3. Configure XML Data to be included // 3A: Include product prices? (1 is on, 0 is off) $product_price = "1"; // 3B: include link to product_info.php at your website? (1 is on, 0 is off) $product_info_link = "1"; // END CONFIGURATION //////////////////////////////////////////// // create connection $connection = mysql_connect("$db_server","$db_user","$db_pass") or die("Couldn't make connection."); // select database $db = mysql_select_db("$db_name", $connection) or die("Couldn't select database."); // create SQL statement $sqlcount = "SELECT * FROM `products` ORDER BY 'products_id'"; $sql = "SELECT * FROM `products` ORDER BY 'products_id'"; // execute SQL query and get result $sql_result = mysql_query($sql,$connection) or die("Couldn't execute query."); $sqlcount_result = mysql_query($sqlcount,$connection) or die("Couldn't execute query."); $num = mysql_numrows($sqlcount_result); mysql_free_result($sqlcount_result); // format results by row while ($row = mysql_fetch_array($sql_result)) { $id = $row["products_id"]; $model = $row["products_model"]; $image = $row["products_image"]; $price = $row["products_price"]; $sql2 = "SELECT `products_name` FROM `products_description` WHERE products_id = '$id' LIMIT 1"; $sql2_result = mysql_query($sql2,$connection) or die("Couldn't execute query."); $sql2_result = mysql_query($sql2,$connection) or die("Couldn't execute query."); $row2 = mysql_fetch_array($sql2_result); $name = $row2["0"]; // add extra data here then add the xml tag below $sql3 = "SELECT `categories_id` FROM `products_to_categories` WHERE products_id = '$id' LIMIT 1"; $sql3_result = mysql_query($sql3,$connection) or die("Couldn't execute query 3."); $row3 = mysql_fetch_array($sql3_result); $catid = $row3["0"]; $sql4 = "SELECT `categories_name` FROM `categories_description` WHERE categories_id = '$catid' LIMIT 1"; $sql4_result = mysql_query($sql4,$connection) or die("Couldn't execute query 4."); $row4 = mysql_fetch_array($sql4_result); $catname = $row4["0"]; $products_url = $row2["4"]; $products_description = $row2["5"]; // add extra data here ?> <PRODUCT ITEM='<?php echo $id; ?>'> <NAME><?php echo $name;?></NAME> <MODEL><?php echo $model; ?></MODEL> <CATEGORY><?php echo $catname; ?></CATEGORY> <?php if ($product_price == 1) { ?> <PRICE><?php printf("%.2f", $price); ?></PRICE> <?php } if ($product_info_link == 1) { ?> <URL value="http://<?php echo $domain_name; ?>/<?php echo $catalog_folder_name; ?>product_info.php?products_id=<?php echo $id; ?>"></URL> <?php } ?> </PRODUCT> <?php } // free resources and close connection mysql_free_result($sql_result); mysql_close($connection); ?> </Disking>
-
Greetings All, I'm Trying to tweak the XML Feed contribution http://www.oscommerce.com/community/contributions,905 I want the XML produced to also include the Category. I've changed the original to that below - but I get an error - " Couldn't execute query 3 " Any help would be gratefully recieved Johno <?php Header( 'Content-Type: text/xml' ); echo '<?xml version="1.0" ?>'; echo "<Disking_Products>"; /* OSCommerce Product XML Feed by Kenny Boyd ([email protected]) http://www.theinternetfoundry.com This hack will provide a basic xml feed which can be polled by applications, affiliate websites or systems using other languages such as C++, Perl, .NET etc to display your product line in xml readable format. It is rehash of the excellent Catalog Anywhere addon programmed by: Patrick Veverka ([email protected]) available at: http://www.oscommerce.com/community/contributions,294 This is a real quick and dirty xml implementation so bugs may exist Please see the README.TXT before you use this */ //////////////////////////////////////////// // THE FOLLOWING OPTIONS MUST BE CONFIGURED! // 1. Configure DB Connection $db_server = "*****"; //database server $db_user = "*****"; //database user $db_pass = "*****"; //database password $db_name = "*****"; //database name // 2. Configure Site Info //Enter the url to your website //don't use any slashes or http eg: www.mysite.com $domain_name = "www.diskingcomputers.co.uk"; //Enter the directory name of your catalog //don't use any slashes eg: catalog $catalog_folder_name = ""; //no slashes // 3. Configure XML Data to be included // 3A: Include product prices? (1 is on, 0 is off) $product_price = "1"; // 3B: include link to product_info.php at your website? (1 is on, 0 is off) $product_info_link = "1"; // END CONFIGURATION //////////////////////////////////////////// // create connection $connection = mysql_connect("$db_server","$db_user","$db_pass") or die("Couldn't make connection."); // select database $db = mysql_select_db("$db_name", $connection) or die("Couldn't select database."); // create SQL statement $sqlcount = "SELECT * FROM `products` ORDER BY 'products_model'"; $sql = "SELECT * FROM `products` ORDER BY 'products_model'"; // execute SQL query and get result $sql_result = mysql_query($sql,$connection) or die("Couldn't execute query."); $sqlcount_result = mysql_query($sqlcount,$connection) or die("Couldn't execute query."); $num = mysql_numrows($sqlcount_result); mysql_free_result($sqlcount_result); // format results by row while ($row = mysql_fetch_array($sql_result)) { $id = $row["products_id"]; $model = $row["products_model"]; $image = $row["products_image"]; $price = $row["products_price"]; $sql2 = "SELECT `products_name` FROM `products_description` WHERE products_id = '$id' LIMIT 1"; $sql2_result = mysql_query($sql2,$connection) or die("Couldn't execute query."); $row2 = mysql_fetch_array($sql2_result); $name = $row2["0"]; // Added By Johno - Category $sql3 = "SELECT 'categories_id' FROM 'products_to_categories' WHERE products_id = '$id'; LIMIT 1"; $sql3_result = mysql_query($sql3,$connection) or die("Couldn't execute query 3."); $sql4 = "SELECT 'categories_name' FROM 'categories_description' WHERE categories_id = '$sql3_result'; LIMIT 1"; $sql4_result = mysql_query($sql4,$connection) or die("Couldn't execute query 4."); // End of Added By Johno - Category // add extra data here then add the xml tag below $products_url = $row2["4"]; $products_description = $row2["5"]; // add extra data here ?> <PRODUCT ITEM='<?php echo $id; ?>'> <NAME><?php echo $name;?></NAME> <MODEL><?php echo $model; ?></MODEL> <?php // Added By Johno - Category ?> <CATEGORY><?php echo $sql4_result; ?></CATEGORY> <?php // End of Added By Johno - Category ?> <?php if ($product_price == 1) { ?> <PRICE><?php printf("%.2f", $price); ?></PRICE> <?php } if ($product_info_link == 1) { ?> <URL value="http://<?php echo $domain_name; ?>/<?php echo $catalog_folder_name; ?>product_info.php?products_id=<?php echo $id; ?>"></URL> <?php } ?> </PRODUCT> <?php } // free resources and close connection mysql_free_result($sql_result); mysql_close($connection); ?> </Disking_Products>