Jump to content
Sign in to follow this  
Didgemandu

Missing data in product edit

Recommended Posts

Hi all,

 

I am in awe of this contribution. its exactly, to the letter, what I wanted!

 

However, I do have a problem - when editing a product the products_price and vendors_prod_id are coming up blank even if I have inserted the information before, and it displays! Very strange! Can anyone help?

 

Oh and to clarify, if I update the product it is overwriting blank information to the database - hence meaning having to enter the product price every time I edit the product details - something which at this early stage in the game I am finding I am doing a fair bit!

 

I think its going to be something simple - like the order the variables are specified in: (code from the MVS install package)

 

    //MVS start   Many additions here, the order they are listed is very important, all new fields have vendor or vendors in the name (ie, "p.vendors_product_price,")
   if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) {
     $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.vendors_prod_id, p.products_image, p.products_price, p.vendors_product_price, p.products_weight, p.vendors_prod_comments, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.vendors_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");
     $product = tep_db_fetch_array($product_query);
 //MVS end

 

I have the header tags seo contribution installed also - this is my current version of this line:

 

    //MVS start   Many additions here, the order they are listed is very important, all new fields have vendor or vendors in the name (ie, "p.vendors_product_price,")
  /*** Begin Header Tags SEO ***/
  if (isset ($HTTP_GET_VARS['pID']) && (!$HTTP_POST_VARS) ) {
     $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.vendors_product_price, p.products_weight, p.vendors_prod_comments, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.vendors_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");
     $product = tep_db_fetch_array($product_query);                            
  /*** End Header Tags SEO ***/
 //MVS end

 

Hope somebody can help!

 

Cheers

 

Didgemandu

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×