Author |
Message |
jlajax
Ardent RavenCMS Supporter
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Oct 12, 2006
Posts: 244
Location: Jacksonville, Florida
|
Posted:
Mon Sep 16, 2013 2:11 am |
|
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](modules/Forums/images/smiles/ravensphpscripts.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
neralex
Site Admin
![](modules/Forums/images/avatars/201442295664a46e4575d46.jpg)
Joined: Aug 22, 2007
Posts: 1775
|
Posted:
Mon Sep 16, 2013 6:37 am |
|
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! http://php.net/manual/en/migration53.deprecated.php
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
|
|
_________________ Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
jlajax
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Sep 17, 2013 3:07 am |
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
neralex
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Sep 17, 2013 11:03 am |
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
wHiTeHaT
Life Cycles Becoming CPU Cycles
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Jul 18, 2004
Posts: 579
|
Posted:
Tue Sep 17, 2013 3:08 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
jlajax
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Sep 18, 2013 9:33 am |
|
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](modules/Forums/images/smiles/ravensphpscripts.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
jlajax
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Sep 18, 2013 9:36 am |
|
So its already been done to work with osc2.3.x? Does it permit multiple stores for an on line mall?
![RavensScripts](modules/Forums/images/smiles/ravensphpscripts.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
wHiTeHaT
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Sep 18, 2013 3:45 pm |
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm
![](modules/Forums/images/avatars/5ed231554a8492e2e09da.gif)
Joined: Aug 13, 2009
Posts: 1123
|
Posted:
Thu Sep 19, 2013 7:39 am |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
wHiTeHaT
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Sep 19, 2013 12:47 pm |
|
@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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|