Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Combine Show sold out & All Products in Category


neoschaos

Recommended Posts

This is exactly what i have been looking for! hours of searching... I LOVE whoever came up with his..

 

But i have a problem..

 

I already have the Show Sold Out Items installed. At http://addons.oscommerce.com/info/4884

 

I want to install this one http://www.oscommerce.com/community/contributions,5351

 

Both that and this one want the same part of code changed in the index.php file to different things.

 

I really need to use both of these for what im trying to do. But im not good with php at all. Most of it looks alien to me. Im shocked i have gotten as far as i have.

 

Can anyone help me out with this? Somekind of work around from someone who knows way more about what they are doing than i do.

 

I would gladly send over a few bucks via paypal for the help of whoever could solve this for me. Thanks alot for at least reading. (Fingers crossed)

Link to comment
Share on other sites

post the two clashing instructions, including code, u should be easy.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

post the two clashing instructions, including code, u should be easy.

 

Ok, i figured you would need to look at the entire codes, i didnt realize it was that easy.

 

For the all products in category it wants me to do the following..

In catalog/index.php:

 

2) Around line 86, replace

 

CODE

// We show them all

$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";

}

}

 

with......

 

CODE

// We show them all

$cPathA = explode("_", $cPath);

$size = sizeof($cPathA)-1;

$subcategories_array = array();

tep_get_subcategories($subcategories_array, $cPathA[$size]);

$size_sc = sizeof($subcategories_array); //Subcat count

$cat_Search = "(";

for($i = 0; $i < $size_sc; $i++){

$cat_Search .= "p2c.categories_id = '" . $subcategories_array[$i] . "' or ";

}

$cat_Search .= "p2c.categories_id = '" . $cPathA[$size] . "'" . ")";

 

$listing_sql = "select distinct " . $select_column_list . " p.products_image, pd.products_name, p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and " . $cat_Search . "";

}

}

 

 

However that code has already been changed to

 

 

/** show-soldout-v1.0 **/ $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, p.products_status, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";

}

}

 

For the show sold out mod..

 

Thanks alot for the help! :):)

Link to comment
Share on other sites

You must have more patience with this type of thing, its not a quick answer so u must wait till someone has time to look!!

 

Also bumping is against forum rules, breaking rules could get u added to ignored lists, thn you really will wonder why no-one is talking to u!!

 

try:

 

// We show them all
$cPathA = explode("_", $cPath);
$size = sizeof($cPathA)-1;
$subcategories_array = array();
tep_get_subcategories($subcategories_array, $cPathA[$size]);
$size_sc = sizeof($subcategories_array); //Subcat count
$cat_Search = "(";
for($i = 0; $i < $size_sc; $i++){
$cat_Search .= "p2c.categories_id = '" . $subcategories_array[$i] . "' or ";
}
$cat_Search .= "p2c.categories_id = '" . $cPathA[$size] . "'" . ")";

$listing_sql = "select distinct " . $select_column_list . " p.products_image, pd.products_name, p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, p.products_status, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and " . $cat_Search . "";
}
}

 

NOT TESTED

Edited by spooks

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

You must have more patience with this type of thing, its not a quick answer so u must wait till someone has time to look!!

 

Also bumping is against forum rules, breaking rules could get u added to ignored lists, thn you really will wonder why no-one is talking to u!!

 

I must apologize sam. When you said i would be easy i guess i was thinking it was a quick or simple task. I did not realize that posting once a day was overdoing it. I really thought that by posting only once a day i was being patient. I just figured once it got too far back in pages no one would see it anymore. Which really ruins the point of having the thread. Since my problem had not been solved i didn't think it would hurt to bump the thread. I didn't realize it was against the rules. Granted i should have read them first. Again i do apologize.

 

Thank you very much for giving this a shot. It really does mean alot to me.

 

I saw no positive change when using the code you posted. I checked it twice to make sure. The only thing that changed was the show sold out mod no longer worked.

 

But thank you for trying anyway. Please PM me your paypal email. I would still like to send you something for the effort.

Link to comment
Share on other sites

Well i just read the rules. Along with bumping it says i can't offer to pay for a service. So again i apologize and respectfully withdraw the offer.

 

If you need any help with any image work let me know. That's my area..

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...