Author Topic: customize virtuemart sub-category  (Read 19816 times)

asura

  • Beginner
  • *
  • Posts: 7
  • hi ..ehemm ..
customize virtuemart sub-category
« on: July 29, 2008, 10:32:40 am »
hi all
im new to virtuemart ..hope anyone here able to help me.
i created more than 1 sub-categories. I tried change to make
3 sub-categories in 1 row. But it shown 4 sub-categories in
1 row. Refer here. How can i change or customize it?
main category named TUDUNG. its have 4 sub-cat

how can i make 3 sub-categories in 1 row? thanks a lot

PINC

  • Jr. Member
  • **
  • Posts: 52
Re: customize virtuemart sub-category
« Reply #1 on: July 30, 2008, 06:55:52 am »
I see 4 categories there. Is it fixed? Pictures do need resizing to look better on the fit of page.  ;)
I use Joomla 1.5.5 and VM 1.1.2

akerman

  • Jr. Member
  • **
  • Posts: 325
  • Knowledge weighs Nothing!
    • STOLT/AKERMAN
Re: customize virtuemart sub-category
« Reply #2 on: August 01, 2008, 23:36:14 pm »
In the file 'categoryChildlist.tpl.php' in /www-root/components/com_virtuemart/themes/your-theme/templates/common/..'

Change the following line to reflect your whish for three sub-cats in a row:
It's on row 5.

$iCol = 1;
if( !isset( $categories_per_row )) {
   $categories_per_row = "3";
}


Good luck


Regards
Akerman
http://STOLT-AKERMAN.com - Web & Design agency. Spemildt in e-shop, ecommerce and marketing.
http://InfoClip.se - Swedish Antique & Used Books & Art Shop.
http://AkermansCove - Personal Portfolio
Ubuntu LAMP / Joomla 1.5.22 / VM 1.1.6 / JoomFish Contributor / Developer / Designer

asura

  • Beginner
  • *
  • Posts: 7
  • hi ..ehemm ..
Re: customize virtuemart sub-category
« Reply #3 on: October 24, 2008, 05:14:07 am »

thanks ..

sori ..its take so long for to reply


thanks a lot bro ..


bunak

  • Beginner
  • *
  • Posts: 37
Re: customize virtuemart sub-category
« Reply #4 on: November 14, 2008, 13:13:42 pm »
Hi!

I want to set one number of sub-categorie per row for shop main page.
and
I want to do the same - set three of sub-categorie per row for second level categories page

akerman

  • Jr. Member
  • **
  • Posts: 325
  • Knowledge weighs Nothing!
    • STOLT/AKERMAN
Re: customize virtuemart sub-category
« Reply #5 on: November 14, 2008, 18:02:09 pm »
Hi,

not sure exactly what you mean. Setting the parameter above will give three (or four, five ... whatever you put in there  ;) Problem might be that you run out of space on the page...)

And this number is valid throughout the whole VM structure top-to-bottom. To get it to start on the 'second' level, takes some other measures. (Of which I don't know anything about. Not right now anyway.)

Hope you manage.

Regards
Akerman 
http://STOLT-AKERMAN.com - Web & Design agency. Spemildt in e-shop, ecommerce and marketing.
http://InfoClip.se - Swedish Antique & Used Books & Art Shop.
http://AkermansCove - Personal Portfolio
Ubuntu LAMP / Joomla 1.5.22 / VM 1.1.6 / JoomFish Contributor / Developer / Designer

bunak

  • Beginner
  • *
  • Posts: 37
Re: customize virtuemart sub-category
« Reply #6 on: November 15, 2008, 18:31:00 pm »
I want 3 categories per record on a first (main) page
In other level (when select main/first/ category) I want only 1 category per record.

akerman

  • Jr. Member
  • **
  • Posts: 325
  • Knowledge weighs Nothing!
    • STOLT/AKERMAN
Re: customize virtuemart sub-category
« Reply #7 on: November 21, 2008, 08:12:34 am »
Hmm, I see.

There is a different layout for the front of the shop (where you're main categories are), separated from the category listing pages, but I think the category calculations in VM runs from top to bottom, without exception. That is, you set '3', well then it's going to be '3' al the way, no exceptions. n orderto changethis I think you have to make quite an extensive hack. (Quite sure you wont find it in here, since I haven't seen it yet... :-\)


You can of course simply set VM to show maximum 3 categories, as mentioned above and then just publish 1 category in the sub-categories.

The problem with VM is that if you publish categories and they are empty, they still will show up. I made a hack for this but do not remember the number of that thread. Search for my name and 'category' then you'll probably find it.

Hope it helps.

Regards
Akerman
http://STOLT-AKERMAN.com - Web & Design agency. Spemildt in e-shop, ecommerce and marketing.
http://InfoClip.se - Swedish Antique & Used Books & Art Shop.
http://AkermansCove - Personal Portfolio
Ubuntu LAMP / Joomla 1.5.22 / VM 1.1.6 / JoomFish Contributor / Developer / Designer

bunak

  • Beginner
  • *
  • Posts: 37
Re: customize virtuemart sub-category
« Reply #8 on: November 29, 2008, 10:45:52 am »
I do it. It so ease. :)

So.

VirtueMart 1.1

1. For set 3 numbers of categories on first (main) page need add code
/administrator/components/com_virtuemart/html/shop.index.php
Code: [Select]
$tpl->set( 'categories_per_row', 3 );
$categories = $tpl->fetch( 'common/categoryChildlist.tpl.php');

2. For set 1 number of categories on on other page need change
/components/com_virtuemart/themes/default/templates/common/categoryChildlist.tpl.php
Code: [Select]
$categories_per_row = 1

fortza

  • Jr. Member
  • **
  • Posts: 71
  • VM confused
Re: customize virtuemart sub-category
« Reply #9 on: December 14, 2008, 20:26:30 pm »
Cool....

...... can you also help me - I will have 1 category line on the left side ..... with a background color, and then a different background color for category 2, etc. ?

Best, Fortza

akerman

  • Jr. Member
  • **
  • Posts: 325
  • Knowledge weighs Nothing!
    • STOLT/AKERMAN
Re: customize virtuemart sub-category
« Reply #10 on: December 16, 2008, 09:18:03 am »
Hi,

In short, all category 'objects' collect their styling from the same code.

In order to achieve different looks for a ' category column' or 'category row', you would need to rewrite the VM code.

In order to successfully do that you need at least to install and learn the basic use of the following tools: Firebug and Web Developer Tools. Look on Google for these and in the Firefox addons. 

Maybe an alternative is to use another template for the VM category pages? (Not sure if it can be done, since addressing of the specific VM component pages isn't easy in Joomla!.)


I'm not saying it can't be done or even that I'm 100% right, but it will for sure involve some intricate hacking.

Sorry for not being to able to help further, hope you manage. 

Regards
Akerman
http://STOLT-AKERMAN.com - Web & Design agency. Spemildt in e-shop, ecommerce and marketing.
http://InfoClip.se - Swedish Antique & Used Books & Art Shop.
http://AkermansCove - Personal Portfolio
Ubuntu LAMP / Joomla 1.5.22 / VM 1.1.6 / JoomFish Contributor / Developer / Designer

fortza

  • Jr. Member
  • **
  • Posts: 71
  • VM confused
Re: customize virtuemart sub-category
« Reply #11 on: December 17, 2008, 09:13:41 am »
Hi Akerman.


Thanks for your response on. category / product template ..... I have send your answer to a programmer for the task.

I have also just another question for you - it seems as though you have much control over VM :-)

When I insert a product image, and later regret the deployment - I can not remove it again, I have been immersed ftp ..... removed the pictures, and now there is just a red cross, can you can help me with this issue ...?

Have another question ...... but by then not just whether I dare asking you ......


Greetings, Fortza

akerman

  • Jr. Member
  • **
  • Posts: 325
  • Knowledge weighs Nothing!
    • STOLT/AKERMAN
Re: customize virtuemart sub-category
« Reply #12 on: December 19, 2008, 11:13:21 am »
Hi,

sorry for the delay...Christmas is coming... :D

In order to successfully remove the product image or any additional image / file in VM you can follow the images below.

Click the items/links in the red circles. These are the only places inside the backend where you can delete an image.

I guess you've tried the normal approach (the image w the chainsaw below) already. In that case try the other approach.

Regards
Akerman   

[attachment cleanup by admin]
http://STOLT-AKERMAN.com - Web & Design agency. Spemildt in e-shop, ecommerce and marketing.
http://InfoClip.se - Swedish Antique & Used Books & Art Shop.
http://AkermansCove - Personal Portfolio
Ubuntu LAMP / Joomla 1.5.22 / VM 1.1.6 / JoomFish Contributor / Developer / Designer

effeebee

  • Beginner
  • *
  • Posts: 3
Re: customize virtuemart sub-category
« Reply #13 on: March 01, 2009, 13:44:09 pm »
Akerman, that's a great tip. I set the categories per row to 3 and restyled the table to 75% align center. It looks perfect, thanks!

fortza

  • Jr. Member
  • **
  • Posts: 71
  • VM confused
Re: customize virtuemart sub-category
« Reply #14 on: March 03, 2009, 13:29:56 pm »
Hi Akerman

Thats okay  ;D

I need your help on a WERY importent mater......when the site is running in catalog mode.....the costumer have an opportunity to ask about a price on a product .... how/where do I change this form of contact email ...... I will add some more fields .....

i REALY hope that yoy will help med FAST in this issue/questions

The WERY best, Fortza