Version Notes
Fix Edit Brand and XML layout.
Download this release
Release Info
Developer | Magento Core Team |
Extension | Shop_By_Brand_Vilpjsc |
Version | 1.1.2 |
Comparing to | |
See all releases |
Code changes from version 1.1.1 to 1.1.2
app/design/frontend/default/default/template/brand/brand_info.phtml
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$item = $this->brandInfo();
|
3 |
+
$breadcrumbs = $this->getLayout()->getBlock('breadcrumbs');
|
4 |
+
|
5 |
+
$breadcrumbs->addCrumb('home', array('label' => Mage::helper('cms')->__('Home'), 'title' => Mage::helper('cms')->__('Home Page'), 'link' => Mage::getBaseUrl()));
|
6 |
+
|
7 |
+
$breadcrumbs->addCrumb('country', array('label' => Mage::helper('brand')->__('All Brands'), 'title' => Mage::helper('brand')->__('All Brands'), 'link' => Mage::getBaseUrl() . 'brand/index'));
|
8 |
+
|
9 |
+
$breadcrumbs->addCrumb('manufacturer', array('label' => preg_replace("/%20/", " ", Mage::app()->getRequest()->getParam('brandname')), 'title' => preg_replace("/%20/", " ", Mage::app()->getRequest()->getParam('brandname'))));
|
10 |
+
|
11 |
+
echo $this->getLayout()->getBlock('breadcrumbs')->toHtml();
|
12 |
+
if ($item != NULL) {
|
13 |
+
if ($item->getFilename()):
|
14 |
+
?>
|
15 |
+
<div class="brand_info"><img src="<?php echo Mage::getBaseUrl() . "media/brand/" . $item->getFilename(); ?>" alt="<?php echo $item->getTitle() ?>">
|
16 |
+
<p><?php echo $item->getContent() ?></p>
|
17 |
+
</div>
|
18 |
+
<?php
|
19 |
+
else:
|
20 |
+
echo "<div class='brand_info'><p>" . Mage::helper("brand")->__("Products of ") . $item->getValue() . "</p></div>";
|
21 |
+
endif;
|
22 |
+
}
|
23 |
+
else
|
24 |
+
echo "<div class='brand_info'>" . Mage::helper("brand")->__("Can not found this manufacturer id.") . "</div>"
|
25 |
+
?>
|
app/design/frontend/default/default/template/brand/categorybrand.phtml
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div id="whole_most_prod">
|
2 |
+
<div class="most_prod_hd"><img src="<?php echo Mage::getBaseUrl()?>skin/frontend/default/patronstore/images/most_prod_box_hd_left.jpg" class="floatLeft"><img src="<?php echo Mage::getBaseUrl()?>skin/frontend/default/patronstore/images/most_prod_box_hd_right.jpg" class="floatRight"></div>
|
3 |
+
<div class="most_prod_cont">
|
4 |
+
<h1>Featured Brands</h1>
|
5 |
+
<?php $_category = Mage::registry('current_category');
|
6 |
+
$categoryId = $_category->getId();
|
7 |
+
$categoryBrands = $this->getBrandCategories($categoryId);
|
8 |
+
foreach($categoryBrands as $brand):?>
|
9 |
+
<div class="most_prod_row">
|
10 |
+
<div class="mstprod_eabox line_mprd">
|
11 |
+
<a title="<?php echo $brand['title']?>" href="<?php echo Mage::getBaseUrl()."brand/index/view/manufacturer/".$brand['brand_id'].'/?brandname='.$brand['title'] ?>" class="img_hover">
|
12 |
+
<img border="0" alt="<?php echo $brand['title']?>" src="<?php echo $brand['logo']?>">
|
13 |
+
</a>
|
14 |
+
<h4>
|
15 |
+
<?php echo $brand['content']?>
|
16 |
+
</h4>
|
17 |
+
|
18 |
+
</div>
|
19 |
+
<div class="clear"></div>
|
20 |
+
</div>
|
21 |
+
<?php endforeach ?>
|
22 |
+
</div>
|
23 |
+
<div class="most_prod_ft"><img src="<?php echo Mage::getBaseUrl()?>skin/frontend/default/patronstore/images/most_prod_box_ft_left.jpg" class="floatLeft"><img src="<?php echo Mage::getBaseUrl()?>skin/frontend/default/patronstore/images/most_prod_box_ft_right.jpg" class="floatRight"></div>
|
24 |
+
</div>
|
app/design/frontend/default/default/template/brand/index.phtml
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="brand_logo_container">
|
2 |
+
<h3><?php echo $this->__('Featured Brands') ?></h3>
|
3 |
+
<?php $i = 1;
|
4 |
+
foreach ($this->getFeaturedBrand() as $item): ?>
|
5 |
+
<div class="featured_brand <?php if ($i % 4 == 0)
|
6 |
+
echo 'no-margin' ?>">
|
7 |
+
<a href="<?php echo Mage::getBaseUrl() ?>brand/index/view/manufacturer/<?php echo $item['manufacturer_option_id'] ?>/?brandname=<?php echo $item['title'] ?>">
|
8 |
+
<img src="<?php echo Mage::getBaseUrl('media') . 'brand' . '/' . $item['filename'] ?>"
|
9 |
+
alt="<?php echo $item['title'] ?>"/>
|
10 |
+
</a>
|
11 |
+
<span>
|
12 |
+
<strong><?php echo $item['title'] ?></strong>
|
13 |
+
<h4><?php echo $item['content'] ?></h4>
|
14 |
+
</span>
|
15 |
+
</div>
|
16 |
+
<?php $i++;
|
17 |
+
endforeach; ?>
|
18 |
+
</div>
|
19 |
+
|
20 |
+
<div id="whole_most_prod">
|
21 |
+
<div class="most_prod_cont">
|
22 |
+
<div class="brand_block">
|
23 |
+
<div class="navigation">
|
24 |
+
<h3><?php echo Mage::helper("brand")->__("All Brands") ?></h3>
|
25 |
+
<ul class="navigation_char"><?php echo $this->navigation() ?></ul>
|
26 |
+
</div>
|
27 |
+
</div>
|
28 |
+
<div class="brand_list">
|
29 |
+
<ul class="brand_normal">
|
30 |
+
<?php
|
31 |
+
$collection = $this->getBrandChar();
|
32 |
+
$noItem = $collection->count();
|
33 |
+
if ($noItem > 12)
|
34 |
+
$column = 4;
|
35 |
+
elseif ($noItem <= 12 && $noItem > 8)
|
36 |
+
$column = 2;
|
37 |
+
elseif ($noItem <= 8 && $noItem > 4)
|
38 |
+
$column = 3;
|
39 |
+
else
|
40 |
+
$column = 1;
|
41 |
+
$itemEachColumn = floor($noItem / $column);
|
42 |
+
$firstColumn = $itemEachColumn + $noItem % $column;
|
43 |
+
$itemCount = 1;
|
44 |
+
$column1 = '<div class="column1">';
|
45 |
+
$column2 = '<div class="column2">';
|
46 |
+
$column3 = '<div class="column3">';
|
47 |
+
$column4 = '<div class="column4">';
|
48 |
+
foreach ($collection as $brand):
|
49 |
+
$item = '<li>
|
50 |
+
<a href="' . Mage::getBaseUrl() . 'brand/index/view/manufacturer/' . $brand['option_id'] . '/?brandname=' . $brand['value'] . '">' . $brand['value'] . '</a>
|
51 |
+
</li>';
|
52 |
+
if ($itemCount <= $firstColumn)
|
53 |
+
$column1 .= $item;
|
54 |
+
elseif ($itemCount <= ($firstColumn + $itemEachColumn) && $itemCount > $firstColumn)
|
55 |
+
$column2 .=$item;
|
56 |
+
elseif ($itemCount <= ($firstColumn + $itemEachColumn * 2) && $itemCount > $firstColumn + $itemColum)
|
57 |
+
$column3 .=$item;
|
58 |
+
else
|
59 |
+
$column4 .=$item;
|
60 |
+
$itemCount++;
|
61 |
+
endforeach;
|
62 |
+
echo $column1 . "</div>" . $column2 . "</div>" . $column3 . "</div>" . $column4 . "</div>";
|
63 |
+
?>
|
64 |
+
</ul>
|
65 |
+
</div>
|
66 |
+
</div>
|
67 |
+
</div>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Shop_By_Brand_Vilpjsc</name>
|
4 |
-
<version>1.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
@@ -11,8 +11,8 @@
|
|
11 |
<notes>Fix Edit Brand and XML layout.</notes>
|
12 |
<authors><author><name>We Burn It</name><user>auto-converted</user><email>weburnittv@gmail.com</email></author></authors>
|
13 |
<date>2011-10-03</date>
|
14 |
-
<time>
|
15 |
-
<contents><target name="magelocal"><dir name="Vilpjsc"><dir name="Brand"><dir name="Block"><dir name="Adminhtml"><dir name="Brand"><dir name="Edit"><dir name="Tab"><file name="Form.php" hash="a8ce7cfb49658d5bf7186569d8ec5af9"/></dir><file name="Form.php" hash="a2adb56e3ea97277088547f9b71e9af1"/><file name="Tabs.php" hash="5efb6e595d30536afa2d4a8e38d35a8b"/></dir><dir name="Grid"><dir name="Renderer"><file name="Arrange.php" hash="dbdd6573e2105280d4e7687e157bbe9c"/><file name="Image.php" hash="721de9b9eccac541737dc7a06af95aa3"/></dir></dir><file name="Edit.php" hash="e6c096481d92ef18527ea092998f8216"/><file name="Grid.php" hash="a0013fd52b382fc1983362c7ba1a2b65"/></dir><dir name="Tab"><dir name="Brand"><dir name="Renderer"><file name="Checkbox.php" hash="ab7596bb0dd186a1699c226b16dba076"/></dir></dir><file name="Brand.php" hash="db3db45c7f6142d6cfaa5e7533dbacb3"/></dir><file name="Brand.php" hash="bfd7a47137600b79aecc1852686b4a0e"/><file name="Tabs.php" hash="6c5674b87f2e32270d61a8f6289cb76e"/></dir><file name="Brand.php" hash="fcb1a83eff532365ea9f28bb38e663dd"/><file name="Brandinfo.php" hash="8b8224ae319a54e6a325e94b2e6ed3ba"/><file name="Category.php" hash="17f16d62d590017988c69dc7794ce32e"/><file name="Onbrand.php" hash="f1e8eeeda37b4b0b4c7c0aa312490d22"/></dir><dir name="Helper"><file name="Data.php" hash="675badc36ff79c07e8a45029ce04f902"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Brand"><file name="Collection.php" hash="aed1882a2deccfb34441a0b9c42b1443"/></dir><dir name="Category"><file name="Collection.php" hash="b6aea9d190da1c4726f26f4838e0c8a7"/></dir><file name="Brand.php" hash="a2cf81cba953ea515aad52163ff43401"/><file name="Category.php" hash="6804ea56d6c6b611eace7ca665021777"/></dir><file name="Brand.php" hash="dc03130d2682828d2d42690be5e877e5"/><file name="Category.php" hash="b8d7adf55972e7293e790c0d17a58eb1"/><file name="Categoryname.php" hash="e1b5f216aa1b1796014dec708e33c100"/><file name="Observer.php" hash="a3c2e8c5e9362b17d0a2df638c6ae2cd"/><file name="Status.php" hash="1c359ecd7c1e8e72e884191cca302f72"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="BrandController.php" hash="d301233e6560b25e903afdc3cf570976"/></dir><file name="IndexController.php" hash="f864d56b2d7ad45269856f51861e71b0"/></dir><dir name="etc"><file name="config.xml" hash="bec2b2e348dfe6ff8e0ff33385048054"/></dir><dir name="sql"><dir name="brand_setup"><file name="mysql4-install-0.1.0.php" hash="ee1222e509f6b5f9f157ff5aeca07e79"/><file name="mysql4-upgrade-0.1.0-1.0.0.php" hash="1ceb98efe6b52ff256dd68805082b85e"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Vilpjsc_Brand.xml" hash="8b0112a53ff9d27603d014530b0b5e6a"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="brand.xml" hash="b4411f55825b5675752bcdebbe761443"/></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="brand.xml" hash="7d2421a2a311421adc2963f4411f6029"/></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Shop_By_Brand_Vilpjsc</name>
|
4 |
+
<version>1.1.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
11 |
<notes>Fix Edit Brand and XML layout.</notes>
|
12 |
<authors><author><name>We Burn It</name><user>auto-converted</user><email>weburnittv@gmail.com</email></author></authors>
|
13 |
<date>2011-10-03</date>
|
14 |
+
<time>23:15:00</time>
|
15 |
+
<contents><target name="magelocal"><dir name="Vilpjsc"><dir name="Brand"><dir name="Block"><dir name="Adminhtml"><dir name="Brand"><dir name="Edit"><dir name="Tab"><file name="Form.php" hash="a8ce7cfb49658d5bf7186569d8ec5af9"/></dir><file name="Form.php" hash="a2adb56e3ea97277088547f9b71e9af1"/><file name="Tabs.php" hash="5efb6e595d30536afa2d4a8e38d35a8b"/></dir><dir name="Grid"><dir name="Renderer"><file name="Arrange.php" hash="dbdd6573e2105280d4e7687e157bbe9c"/><file name="Image.php" hash="721de9b9eccac541737dc7a06af95aa3"/></dir></dir><file name="Edit.php" hash="e6c096481d92ef18527ea092998f8216"/><file name="Grid.php" hash="a0013fd52b382fc1983362c7ba1a2b65"/></dir><dir name="Tab"><dir name="Brand"><dir name="Renderer"><file name="Checkbox.php" hash="ab7596bb0dd186a1699c226b16dba076"/></dir></dir><file name="Brand.php" hash="db3db45c7f6142d6cfaa5e7533dbacb3"/></dir><file name="Brand.php" hash="bfd7a47137600b79aecc1852686b4a0e"/><file name="Tabs.php" hash="6c5674b87f2e32270d61a8f6289cb76e"/></dir><file name="Brand.php" hash="fcb1a83eff532365ea9f28bb38e663dd"/><file name="Brandinfo.php" hash="8b8224ae319a54e6a325e94b2e6ed3ba"/><file name="Category.php" hash="17f16d62d590017988c69dc7794ce32e"/><file name="Onbrand.php" hash="f1e8eeeda37b4b0b4c7c0aa312490d22"/></dir><dir name="Helper"><file name="Data.php" hash="675badc36ff79c07e8a45029ce04f902"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Brand"><file name="Collection.php" hash="aed1882a2deccfb34441a0b9c42b1443"/></dir><dir name="Category"><file name="Collection.php" hash="b6aea9d190da1c4726f26f4838e0c8a7"/></dir><file name="Brand.php" hash="a2cf81cba953ea515aad52163ff43401"/><file name="Category.php" hash="6804ea56d6c6b611eace7ca665021777"/></dir><file name="Brand.php" hash="dc03130d2682828d2d42690be5e877e5"/><file name="Category.php" hash="b8d7adf55972e7293e790c0d17a58eb1"/><file name="Categoryname.php" hash="e1b5f216aa1b1796014dec708e33c100"/><file name="Observer.php" hash="a3c2e8c5e9362b17d0a2df638c6ae2cd"/><file name="Status.php" hash="1c359ecd7c1e8e72e884191cca302f72"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="BrandController.php" hash="d301233e6560b25e903afdc3cf570976"/></dir><file name="IndexController.php" hash="f864d56b2d7ad45269856f51861e71b0"/></dir><dir name="etc"><file name="config.xml" hash="bec2b2e348dfe6ff8e0ff33385048054"/></dir><dir name="sql"><dir name="brand_setup"><file name="mysql4-install-0.1.0.php" hash="ee1222e509f6b5f9f157ff5aeca07e79"/><file name="mysql4-upgrade-0.1.0-1.0.0.php" hash="1ceb98efe6b52ff256dd68805082b85e"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Vilpjsc_Brand.xml" hash="8b0112a53ff9d27603d014530b0b5e6a"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="brand.xml" hash="b4411f55825b5675752bcdebbe761443"/></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="brand.xml" hash="7d2421a2a311421adc2963f4411f6029"/></dir><dir name="template"><dir name="brand"><file name="brand_info.phtml" hash="fba5be7f4aa39040ff240e70d3445683"/><file name="categorybrand.phtml" hash="205a3c4e27db817b5d2760e376b31f35"/><file name="index.phtml" hash="ff13a7d5a5aabdb85828428c76ea29f1"/></dir></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|