Jump to content

Adding products of £5 or less to another category


Fordie

Recommended Posts

Hi
Just wondered if there was any development ideas out there to help me

I want to add all products within certain price ranges (e.g: products under £5) and add them to another category such as stocking fillers for Xmas whilst keeping them in there original categories!
Can this somehow be done as I would like something along these lines to have as part as my shop?

Regards
Fordie49

Link to comment
Share on other sites

Thanks for the info but I know thy part it's just I have over 2000 products ad just say I create a category for a particular event such as Xmas, valentine day etc... I need to move items that also fit into that category but I don't want to go through all 2000 items to add them individually as this would take to much time,
I need something where I can change the criteria such as price range on the catalogue page which will return all items witting the price and I can simply tick them and add them all together to the specified category
Hope that made sense

Regards
Fordie49

Link to comment
Share on other sites

psuedo code..

SELECT * FROM ps_product WHERE price<5 AND NOT EXISTS (SELECT * FROM ps_category_product WHERE ps_product.product_id=ps_category_product.product_id AND ps_category_product.categoryid=the id of your <5 cat)

mysql fetch array(query)

whileloop(){
INSERT INTO ps_category_product (categoryid, productid) VALUES ('the id of your less than 5 category', $row['id_product'])
}

..

sorry if its a bit rough for you.. dont have time for a full explaination right now..

Link to comment
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
×
×
  • Create New...