Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Show a Catagory on the main index.


Guest

Recommended Posts

Is there a way to have a catagory shown instead of all mixed products on the main index of the shop?

For example:

Anime DVD -> (50)

Horror -> (10)

Japanese -> (10)

Dragonball Z -> (10)

Fantasy -> (10)

Classics -> (10)

Hentai DVD

Video Games

Kung Fu

Asian Cinema

Adult

 

I also have adult movies that i dont want to be randomly shown with other non adult movies.

 

Or:

 

Is there a way not to include a catagory's item to be randomly shown in the main index?

 

Thanks

Link to comment
Share on other sites

Add a column to the product table: is_adult

Let it default to 0. (meaning it is NOT adult)

 

Then update all products that are adult to is_adult = 1

 

Then in all the random queries you add

 

'and is_adult = 0'

 

Done.

 

:)

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Link to comment
Share on other sites

Add a column to the product table:  is_adult

Let it default to 0. (meaning it is NOT adult)

 

Then update all products that are adult to is_adult = 1

 

Then in all the random queries you add  

 

'and is_adult = 0'

 

Done.

 

:)

 

Oh i dont think im that advanced.

 

Let me go over this:

 

In table products add

ALTER TABLE `products` ADD `is_adult` VARCHAR(64) AFTER `products_ordered`

Default to 0? i dunno.

 

Then how do you update the adult products to is_adult = 1?

 

In the queries i add (not so sure how) is_adult = 0 so the adult wont be selected.

 

Still trying to figure this out.

Link to comment
Share on other sites

Use phpMyAdmin to create the table field. You can specify a default value on it with that too. All queries that should NOT show adult need to be edited with the additional and 'is_adult = 0'

 

Just drop it in before another 'and' so

 

'and language_id = "' . $languages_id . '"' becomes

 

'and is_adult = 0 and language_id = "' . $languages_id . '"'

 

 

Also make it an integer as it will only have 0 or 1 as a value.

(copy the in_stock settings if unsure)

 

HTH

Mattice

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Link to comment
Share on other sites

  • 2 weeks later...

Uhg i think i made a mess.

I dont know that much about php or sql.

 

Is there any way i can add something to the catagory itself or is there a mod for adult catagories?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...