Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Manufacturer Categories mod! Free!

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #31  
Old 12-29-2009, 11:12 AM
  thatcrazyartguy's Avatar 
thatcrazyartguy thatcrazyartguy is offline
 

Advanced Member
  
Join Date: Nov 2008
Posts: 34
 

Default Re: Manufacturer Categories mod! Free!

Quote:
Originally Posted by thatcrazyartguy
I was wondering if there is anyway to list each category as a heading, then list each sub category under it instead of listing the same main category more than once. For example, if it lists

CATEGORY A/SUBCATEGORY A
CATEGORY A/SUBCATEGORY B
CATEGORY A/SUBCATEGORY C
CATEGORY B/SUBCATEGORY A
CATEGORY B/SUBCATEGORY B

I could make it list...

CATEGORY A
SUB A
SUB B
SUB C

CATEGORY B
SUB A
SUB B

Anyway to do this?

I actually figured this out. If anyone wants to know how to do this, just let me know here. It may not be the most elegant way, but it works for me. Check it out at www.tennesseespeedsport.com, and pick a manufacturer to see it in action.
__________________
X-Cart version 4.3.2
Reply With Quote
  #32  
Old 12-30-2009, 03:40 AM
 
paryaei paryaei is offline
 

Senior Member
  
Join Date: Jun 2006
Posts: 112
 

Default Re: Manufacturer Categories mod! Free!

Hi

I am really interested to know how to do this. If you could please post the code I would really appreciate it.
__________________
Paryaei
Xcart pro version: 4.1.12
& All the X-cart add ons
& Heavily moded
Reply With Quote
  #33  
Old 12-31-2009, 11:31 AM
  thatcrazyartguy's Avatar 
thatcrazyartguy thatcrazyartguy is offline
 

Advanced Member
  
Join Date: Nov 2008
Posts: 34
 

Default Re: Manufacturer Categories mod! Free!

Quote:
Originally Posted by paryaei
Hi

I am really interested to know how to do this. If you could please post the code I would really appreciate it.

Sure...

Here is what I added to manufacturer_categories.php

First, I added a new value to the $man_categories array called "master_header".

Then...

I made a new array called "master_headers" that contains all the main headings based on the "category_path" of the category data. This is the same value that is applied to the "master_header" key of $man_categories.

This is directly under "$mode = ' ';" (around line 67)

---------------------------------------
$master_headers = array();
$count = "0";
foreach($man_categories as $k=>$v){
$get_top = explode("/",$man_categories[$k]['category_path']);
$man_categories[$k]['master_header'] = $get_top[0];
if(!in_array($get_top[0],$master_headers)){
$master_headers[$count] = $get_top[0];
$count++;
}
}
sort($master_headers);
$smarty->assign("master_headers",$master_headers);
---------------------------------------

This is what I changed in manufacturer_categories.tpl

This replaces the foreach loop in the original.
Just below <hr class="mcat_hr"> - Replaces Lines 60 - 77

It begins by looping through each of the values of the "master_headers" array. Then, it loops through $man_categories displaying all the links and info for each category that falls under the corresponding main headers.

----------------------------------------
{foreach item=master from=$master_headers}
<div style="margin:1em 0 1em 0">
<div style="background-color:#f8f008; font-size:18px; padding:.5em; margin-bottom:.25em">{$master}</div>
{foreach item=mcat from=$man_categories}
<div style="padding-left:1em">
{if ($mcat.master_header eq $master)}
<a href=
"{$catalogs.customer}/manufacturers.php?manufacturerid={$manufacturerid} &catid={$mcat.categoryid}"
style="font-size:12px" class="mcat_link">{$manufacturer.manufacturer} {$mcat.category}</a><br />
{/if}
</div>
{/foreach}
</div>
{/foreach}
----------------------------------------
your {else} should begin just below the code above.

I hope this helps. Any comments or suggestions on this would be very welcome.

JB
Reply With Quote
  #34  
Old 02-09-2010, 01:54 AM
 
Stizerg Stizerg is offline
 

Senior Member
  
Join Date: Apr 2008
Location: Sydney, Australia
Posts: 195
 

Default Re: Manufacturer Categories mod! Free!

Quote:
Originally Posted by thatcrazyartguy
Sure...
Here is what I added to manufacturer_categories.php
First, I added a new value to the $man_categories array called "master_header".
Then...
This is what I changed in manufacturer_categories.tpl

Which version of x-cart is it for? I can't find this files in 4.1 or 4.2?
__________________
X-Cart Gold Plus 4.6.6
A lot of custom mods
Reply With Quote
  #35  
Old 02-21-2010, 03:43 PM
 
spence88mph spence88mph is offline
 

Advanced Member
  
Join Date: Jan 2005
Posts: 95
 

Default Re: Manufacturer Categories mod! Free!

Damn, I have installed this mod, I get the category list but when you click each one the product area stays blank, I've been over the install twice and applied the patch, any ideas?!

V. 4.1.9

http://www.spacadia.com.au
__________________
-------------------
4.2.2
4.1.9
Reply With Quote
  #36  
Old 02-22-2010, 06:09 AM
 
TruVu TruVu is offline
 

Member
  
Join Date: Feb 2010
Posts: 17
 

Default Re: Manufacturer Categories mod! Free!

Is there a mod like this one for the related items to have category > sub-category links? Preferably a drop down from the category to the sub-category for related items.

Herb
__________________
v4.3.1 Gold
Reply With Quote
  #37  
Old 02-23-2010, 07:48 PM
  BCSE's Avatar 
BCSE BCSE is offline
 

X-Guru
  
Join Date: Apr 2003
Location: Ohio - bcsengineering.com
Posts: 3,091
 

Default Re: Manufacturer Categories mod! Free!

Sorry for the delay in replying to this thread. We've had a lot of illness in the office this week. If you're having an issue with it on your site, please drop us an email or support ticket. That will ensure it's not only myself getting the message, then my whole team can and can help out if I'm busy covering for those that are out.


The recent versions of X-cart have many different categories.tpl file which makes having install instructions for this one impossible to have an exact match sometimes for code to find.

Thank you!

Carrie
__________________
Custom Development, Custom Coding and Pre-built modules for X-cart since 2002!

We support X-cart versions 3.x through 5.x!

Home of the famous Authorize.net DPM & CIM Modules, Reward Points Module, Point of Sale module, Speed Booster modules and more!


Over 200 X-cart Mods available & Thousands of Customizations Since 2002 - bcsengineering.com

Please E-Mail us for questions/support!
Reply With Quote
  #38  
Old 04-28-2010, 05:18 AM
  thatcrazyartguy's Avatar 
thatcrazyartguy thatcrazyartguy is offline
 

Advanced Member
  
Join Date: Nov 2008
Posts: 34
 

Default Re: Manufacturer Categories mod! Free!

I have this mod installed, and I changed some things in it, but now I actually have a small problem I can't figure out.

I now want to add a link under the manufacturers' page that can list all products by each manufacturer. After installing this mod, I can't figure out how to do this. Anyone know?
__________________
X-Cart version 4.3.2
Reply With Quote
  #39  
Old 02-28-2011, 09:07 PM
  Phoenixone's Avatar 
Phoenixone Phoenixone is offline
 

Advanced Member
  
Join Date: Feb 2010
Location: Portugal
Posts: 38
 

Default Re: Manufacturer Categories mod! Free!

hi everyone i have this mod installed and i really wish it to have the following structure

"Manufacturer Name" "Category"

eg: "Asus" "Graphics Cards"

here is the current code:

Quote:
{foreach item=mcat from=$man_categories}
<a href="{$catalogs.customer}/manufacturers.php?manufacturerid={$manufacturerid} &catid={$mcat.categoryid}" style="font-size:12px" class="mcat_link">{$mcat.category}</a><br />
{/foreach}

i got the full category path replaced by just the category so thats done now i just need it to show the manufacturers name

i tried {$mcat.manufacturer} but didnt work

please could someone help! i think it would work much better in terms of SEO than the current way?

view my example:

Phoenix Tech Asus
__________________
PHP 5.2.11
MYSQL 5.0.45

WESH UK hosting

--- Add-ons -----
X-RMA
X-AOM
X-FancyCategories
X-Feature comparison

BCSE Request a Quote
BCSE Customer Testimonials
BCSE Advanced ratings and reviews
BCSE Customer reward points
BCSE Reward points refferal
BCSE Customer polls

Cart Labs - Tabs
Reply With Quote
  #40  
Old 04-01-2011, 12:55 AM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: Manufacturer Categories mod! Free!

Hi,
Will this work for latest 4.4.2??

Also If I want to display category on the top as well as product display (as usual) at the bottom..How to achieve that??

Thanks..
__________________
4.6.1 Platinum


Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:34 AM.

   

 
X-Cart forums © 2001-2020