Hello,
I have just started working with MODx and I am considering it for a current project. I am trying to bring over an existing site with a custom shopping cart into MODx. There is a function that returns the contents of the cart to the top of the page/template. It is not working and so far all testing is suggesting to me it is a session issue. Below are the separate snippets. Placed here sequentially for convenience.
<?php
//snippet for code shop class instance
//Session variable
session_start();
//online db info ---------------
include("common.php"); // db constants
include_once("functions.php"); //generic functions
include_once("instance.shop.php"); //-connects to database creates array (used in next snippet) and disconnects
?>
<?php
//snippet for display in template
echo '<strong>View Your Order</strong>';
echo "<strong>(Value : ";
echo "\$".number_format($ordercontents['finaltotalprice'], 2);
echo "</strong>";
echo "<strong>";
echo '/ Items : '.$orderitemcount .' )';
echo "</strong>";
?>
I attempted to make use of mysql_select_db() to change databases, do the query and then change back to modx database. That also did not work.
Eventually I am hoping to integrate the shop completely into MODx as modules and snippets.
For now I just want to test the possibilities.
Is what I am attempting possible?
Could someone make some suggestions?