* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ global $sitemap; if (isset($sitemap['action'])) { $type = $sitemap['action']; } else { $type = 3; } $items = getItemsByType($type); $notice = ""; if (isset($_POST['form_submit']) && $_POST['form_submit'] == '3123123') { $remarks = $_POST['remarks']; $iid = $_POST['item_id']; $item = new Item(); $item->populatItem($iid); $qtty = abs($_POST['qtty']); $size = $_POST['price_group']; switch ($size) { case 'S': $price = $item->prices; break; case 'M': $price = $item->pricem; break; case 'L': $price = $item->pricel; } addToCart($iid, $item->itemname, $qtty, $price, $item->itemCode, $remarks); $notice = sprintf(__('Added %s to the cart (Quantity: %s)'), $item->itemname, $qtty); }
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ if (isset($_GET['type'])) { $itemType = $_GET['type']; } else { $itemType = 3; } if (isset($_GET['iid'])) { $item = new Item(); $item->populatItem($_GET['iid']); } if (isset($_POST['form_id']) && $_POST['form_id'] == FORM_SUBMIT && isAdmin()) { $itemcode = $_POST['itemcode']; $itemname = $_POST['itemname']; $itemtype = $_POST['type']; $prices = $_POST['prices']; $pricem = $_POST['pricem']; $pricel = $_POST['pricel']; $itemsettings['1'] = $_POST['itemsettings_1']; $itemsettings['2'] = $_POST['itemsettings_2']; $itemsettings['3'] = $_POST['itemsettings_3']; $itemsettings['4'] = $_POST['itemsettings_4']; $itemsettings['5'] = $_POST['itemsettings_5']; $itemsettings['6'] = $_POST['itemsettings_6']; $itemsettings['7'] = $_POST['itemsettings_7'];