Page 2 of 3

Re: Create one age with on-sale products

Posted: Thu Jul 08, 2010 11:11 am
by mozack
Thanks for your answers...

I have now the category showing the products onsale. The problem is that to show products there i need to add the product to category :S manually.

I need to check it code by code to auto post products without changing his category or adding to more than 1 category manually.

Initially i thought one php page (simple) to extract products from mysql but it loose the layout, so this is the right code to change...

Well done!

Thanks

Re: Create one age with on-sale products

Posted: Thu Jul 08, 2010 11:40 am
by Tony Barnes
How are you putting products "on sale"?

When we do that we simply give it a retail price (the full rrp), then set rrp to the new sale price - this should only pull those products through, so you shouldn't have to do anything special?

Re: Create one age with on-sale products

Posted: Thu Jul 08, 2010 12:03 pm
by mozack
Yes,

I'm doing by this way... I put the rrp price and the sale price

Well, i'll try...

Thanks

Re: Create one age with on-sale products

Posted: Thu Jul 08, 2010 12:21 pm
by mozack
The problem is that the mod is the some of categories... The categories class shows the products only in categorie. So, by this way, we need to put there or all products or just the products with promo...

ex.:

If always we add a new product we add to 2 different categories (like T-Shirts and Promo) it shows only the onsale products in promo category...


I dont know...

Re: Create one age with on-sale products

Posted: Thu Jul 08, 2010 12:56 pm
by Tony Barnes
Do you have a link to your store?

The "sale category" should be set up to use the _category.html that has the %%Panel.CategorySaleContent%%. No other category should have reference to this, so there should be no changes to any other category. That panel should refer to the CategorySaleContent.php which in turn refers to the GetSaleProducts() - which has removed category restrictions for the products it pulls up, and only looks for ones with a sale price.

Hmm, unless I'm being dumb - do you mean if you add a promo product to the promo category, then it works? And add a non-promo item to the promo category, it doesn't display? Is that right? If so adding every product to the promo category in addition to their regular one would result in a properly functioning promo category? Right?

If that's the case just run an SQL statement and add them all in

Re: Create one age with on-sale products

Posted: Thu Jul 08, 2010 1:52 pm
by mozack
Hi,

I'm trying Interspire features in localhost but yes, you're right if i had products to this category all works fine, otherwise it shows the message telling no products to display :S

I'm trying it and i'll be posting here the results

Thanks

Re: Create one age with on-sale products

Posted: Thu Jul 08, 2010 2:08 pm
by Tony Barnes
So if you add products to that category that DON'T have a sale price, they don't show up, correct? It's working fine then?

In that case take note of the category id, use an SQL browser to export all the products as a csv. Add the category id on to the end of the categories (just concatonate with a , first) so that

1
5
7

becomes

1,13
5,13
7,13

for all your products, then get that back into your database, and you'll be sorted. Going forwards just check the promo category on every new product.

Hmmmm, this isn't a great hack thinking about it! lol

Something isn't working right, it should automatically pull all products in regardless of the category if they are on sale???

Re: Create one age with on-sale products

Posted: Fri Jul 09, 2010 7:41 am
by mozack
Hi,

Sorry for my late :D

Yes, the products dont show if not special... Well I try by the hard way.

Create a php file loading top.php and bottom.php. The truth is that i can load the product name and create the product link but, i cant load the images... The point is duplicate class.category.php and load different files form "normal" category file. Well but by this way i need to create some new files...

I cant get the focus on it :S I'm trying and trying but at this time i got nothing...

I cant figure it to work :( I'll try again. I want to make my promotions automatically to make some newsletters etc... It must be more easy :D

Well, i'll be posting here my points

Regards

Re: Create one age with on-sale products

Posted: Fri Jul 09, 2010 7:46 am
by mozack
I'm looking to duplicate the HomeSaleProducts.php.

In query i need to change the statement to prodprice > prodretailprice.

Now, i need to change the globals variables to make a panel in content and load a snippet with individual products.

Can that be done by this way?

Thanks

Re: Create one age with on-sale products

Posted: Fri Jul 09, 2010 9:35 am
by Tony Barnes
Homesaleproducts won't do any pagination, etc, that is set up for categories.

Sorry - I've just tried to apply this hack to our cart, yeah, doesn't really work does it... Hmmmm. It's definitely along the right lines, just not right, sorry mate