Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> eCommerce
Author Message
jlajax
Ardent RavenCMS Supporter


Joined: Oct 12, 2006
Posts: 244
Location: Jacksonville, Florida

PostPosted: Mon Sep 16, 2013 2:11 am Reply with quote

I recently came up with a solution for including osCommerce in RavenNuke as a storefront that seems to be working very well for my needs. I thought I would share my solution.

I had to modify the rconfig file by adding the following line to $AllowableHTML

Code:


'iframe' => array ('height' =>1, 'width' => 1, 'src' => 1, 'frameborder' => 1),


First I build a standard html page and create a one row one cell table. I place an iFrame tag inside the cell that references the catalog. Once I verify I have it right I then take the table I have created and convert it to a module and upload the module to the site. I name the module Storefront_SomeStoreName. In this manner I can place multiple stores in one RavenNuke site with all of them remaining independent and functional within the same RavenNuke website.

Table Example

Code:


<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center"><iframe width="100%" height="1150" frameborder="0" src="http://www.SomeDomainName.com/catalog/index.php"></iframe>
    </td>
  </tr>
</table>


Module Example

Code:


<?php

if (!eregi("modules.php", $PHP_SELF)) {
   die ("You can't access this file directly...");

}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
include("header.php");
$index = 0;
OpenTable();
echo"<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"
  . " <tr>"
  . "   <td align=\"center\"><iframe width=\"100%\" height=\"1150\" frameborder=\"0\" src=\"http://www.SomeDomainName.com/catalog/index.php\"></iframe>"
  . "   <br /></td>"
  . " </tr>"
  . "</table>";
CloseTable();
include("footer.php");

?>


This very simple solution works for my needs. I hope it helps some of you good people.

RavensScripts RavensScripts RavensScripts RavensScripts RavensScripts RavensScripts
 
View user's profile Send private message
neralex
The Mouse Is Extension Of Arm


Joined: Aug 22, 2007
Posts: 1296
Location: Germany

PostPosted: Mon Sep 16, 2013 6:37 am Reply with quote

That is a really bad solution to use an iframe for that. You have also some outdated code in your module example:

... eregi is deprecated since PHP5.3! Only registered users can see links on this board! Get registered or login!
If you are using this deprecated function, then you are creating php errors!

replace:

Code:
if (!eregi("modules.php", $PHP_SELF)) {

   die ("You can't access this file directly...");

}


with this one:

Code:
if (!defined('MODULE_FILE')) die('You can\'t access this file directly...');


... require of mainfile is not more needed since RN25! You can remove the line!


... $index = 0; will not work in RN25, use this one:

Code:
// BEGIN: Added in v2.40.00 - Mantis Issue 0001043

$index = 0;
if (!defined('INDEX_FILE')) define('INDEX_FILE', true); // Set to FALSE to hide right blocks
if (defined('INDEX_FILE') AND INDEX_FILE===true) {
   // auto set right blocks for pre patch 3.1 compatibility
   $index = 1;
}
// END: Added in v2.40.00 - Mantis Issue 0001043
 
View user's profile Send private message
jlajax
PostPosted: Tue Sep 17, 2013 3:07 am Reply with quote

neralex wrote:
That is a really bad solution to use an iframe for that. You have also some outdated code in your module example:


Hmm I got a lot of custom modules to rebuild then. I thank you for pointing out the deprecated code. I don't understand why it is a bad method though... It works, its simple and so far I have seen no adverse affects. I have to update my module template for sure.
 
neralex
PostPosted: Tue Sep 17, 2013 11:03 am Reply with quote

You don't have it included - its only embedded because you have no connection to the nuke database. No connection to the RN users mangement and no connection to the RN ACP. Simply, you can't control the shop with the RN.

You are showing only a external page with separate user/admin management in a RN module - not more. You are duplicate also content and after every shop-registration the user come back to the real-url of the shop-system and can not stay in RN.

I would create a database queries to catch product-lists in a block or module with links to the product-pages of the shop-system.

It exists an old phpnuke module OSC2Nuke, but i believe its not ready for RN.
 
wHiTeHaT
Life Cycles Becoming CPU Cycles


Joined: Jul 18, 2004
Posts: 576
Location: Netherlands

PostPosted: Tue Sep 17, 2013 3:08 pm Reply with quote

It works in RN , the only problem was the gfx code not working in RN after installed osc2nuke.
But it was fixed. Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
jlajax
PostPosted: Wed Sep 18, 2013 9:33 am Reply with quote

Thank you. I do understand all of that. I do not yet possess the skills to do it properly but it is my plan at some point to do so. I study and learn more daily. In the meantime the customer’s storefront is displayed in their RN(tm) CMS while remaining independent of the CMS. That is my present intent. It puts the storefront where my clients customers can easily find it and pursue the products the client offers. It also allows me to place the customers storefront in my network of RN(tm) CMSs’ providing my customer with more visibility which (IMHO) is never a bad thing. Is it a perfect solution? No way… is it a working solution.. so far it appears to be so.

RavensScripts RavensScripts RavensScripts RavensScripts RavensScripts RavensScripts
 
jlajax
PostPosted: Wed Sep 18, 2013 9:36 am Reply with quote

So its already been done to work with osc2.3.x? Does it permit multiple stores for an on line mall?

RavensScripts RavensScripts RavensScripts RavensScripts RavensScripts RavensScripts
 
wHiTeHaT
PostPosted: Wed Sep 18, 2013 3:45 pm Reply with quote

No it does not.
BTW i do not have the old files anymore.I am not sure what files floating around the net currently.Probably i will start the osc 2.4 version as soon as i finished my Modulemaker project.
 
hicuxunicorniobestbuildpc
Life Cycles Becoming CPU Cycles


Joined: Aug 13, 2009
Posts: 967
Location: Netherland

PostPosted: Thu Sep 19, 2013 7:39 am Reply with quote

This is the last version I found on my computer. I just upload it if someone needs it. This one only works with RavenNuke 2.4+
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message Visit poster's website
wHiTeHaT
PostPosted: Thu Sep 19, 2013 12:47 pm Reply with quote

@hicux .... nice you want to share this version.
But this version never became officially released as a production ready.
Infact, oscommerce abandoned this alpha5 version.
Some other guys picked it up and started Only registered users can see links on this board! Get registered or login!with it.
The best chances you would get with a osc2.2 version.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> eCommerce

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©