osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Trying to create a new status behaviour

This is a discussion on Trying to create a new status behaviour within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; Hi, I am trying to create an additional set of status buttons in the admin section. The purpose of these ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > osCommerce 2.2 Modification Help

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 02-18-2003, 01:40 AM
New Member
 
Join Date: Feb 2003
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Dr_Evil
Default Trying to create a new status behaviour

Hi,
I am trying to create an additional set of status buttons in the admin section.

The purpose of these buttons is so that the site administrator can set a product to sold (and show a message to the user that this product has been sold) and this will not remove the product completely as the other status buttons do.

I did not modify the current status behavior because I wanted to keep that functionality as well. I looked around for a contribution and found one that will signify (by a custom message) when a stock item gets low. This contribution is based on stock quantities.

This is not suitable because I will only ever have one of the product and I simply want to toggle between sold or not sold.

I created a new field in products ( product_status_sold ). I did not modify the current status field as I wanted to keep it
separate as I am completely new to PHP and could not gage the impact on the rest of the app. I created a function, a selection

structure to set the message of "This Product is SOLD" based on the value of the new status field in the products file and created the

new buttons on the admin form. I tested it. The data base is getting populated and the message is getting displayed correctly.

Everything seems to work but the buttons.

I can see the buttons, I can even click them. The problem is that I have duplicated the functionality of the other
status buttons. So when I click on a status my new buttons also behave as if they have been clicked on as well and visa-versa.

I have isolated the problem down to, I think, this group of code. However, I am not sure how I can separate this
code out. I have tried a few things.

Any ideas?



Admin/Categories.php

Starts at about line 44 in Categories.php

if ($HTTP_GET_VARS['action']) {
switch ($HTTP_GET_VARS['action']) {
case 'setflag':
if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) {
if ($HTTP_GET_VARS['pID']) {
tep_set_product_status($HTTP_GET_VARS['pID'], $HTTP_GET_VARS['flag']);
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Google status are not set up in the database jasper0 osCMax v2 Customization/Mods 0 01-01-2007 06:58 PM
stock status issues jonnyl osCMax v2 Installation issues 2 06-11-2006 04:46 PM
How to Add New Order Status Values MikeS osCMax v1.7 Discussion 2 05-18-2005 12:22 AM
Strange behaviour lhotch osCMax v1.7 Installation 1 08-10-2004 02:00 PM
I want to die !! Strange Behaviour PLZ HELP !! S.O.S. ! damnedpig osCMax v1.7 Discussion 2 07-26-2004 04:45 AM


All times are GMT -8. The time now is 04:35 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax