If I click on a product from my product overview on the left side, the shop does not load with the list.phtml. As soon as I swap view to grid or list, it swaps to the list.phtml file and everything is fine. But as I said, if I click on the products on the sidebar, it doesnt work (it's not even affected by list.phtml at all). I removed all the code inside it and it still showed (a bit different, that's why I want to change it) the products, but as soon as I swapped mode, everything disappeared -- as it should. Do you know where I can change that?
Thank you.
It should use list.phtml file. In that file it is defined for both list mode and grid mode.
<?php echo $this->getToolbarHtml() ?>
<?php // List mode ?>
<?php if($this->getMode()!='grid'): ?>
<?php $_iterator = 0; ?>
And
<?php else: ?>
<?php // Grid Mode ?>
<?php $_collectionSize = $_productCollection->count() ?>
You can see something like above code in your list.phtml file,one is for list mode and another for grid mode. This is the default case unless you haven't changed the layout or template code.
If you want to know the file location than you can always enable template path hint. If you don't know how to do that you can follow this.
After knowing from which file it is rendering you can fix it.
Hope this will help.
Related
I have a Joomla 2.5 page consisting of a logo graphic and an entry button which I want to use as the home page. I've pretty much sorted out how to remove the menu module from this page but I want to remove the header and footer too but I can't see how. I would guess, perhaps wrongly, that changes need to be made in the template (beez20) index.php but what exactly? There seems to be plenty of advice online about removing either header/footer from all pages but not for a single page. Any help would be much appreciated
If header and footer are parts of design and not modules, you have to make an addition to template index.php to disable these parts.
<?php
$app = JFactory::getApplication();
$menu = $app->getMenu();
if ($menu->getActive() != $menu->getDefault()) :
?>
<p> This will be hidden from frontpage </p>
<?php
endif;
?>
You could check this tutorial to help you how to determine if user is viewing the front page for all joomla versions and the addition that is needed for multilingual sites: How to determine if the user is viewing the front page
I want to add a new field in virtuemart new product form, how can i do that ?
I add:
var $is_act = 1;
in "components\com_virtuemart\tables\products.php"
And
<?php echo VmHTML::checkbox('is_act', $this->product->is_act); ?>
And in database but what is appear is a checkbox without a string behind it, what is the wrong ?!
The VMHTL::checkbox function just create a check box without strings.
If you want to add string behind it you have to do something like this.
<?php echo JText::_('COM_VIRTUEMART_PRODUCT_IS_ACT') ?>
<?php echo VmHTML::checkbox('is_act', $this->product->is_act); ?>
And then COM_VIRTUEMART_PRODUCT_IS_ACT should be added inside language file too.
for more clearness just check VM default product_edit_information.php page inside
administrator/components/com_virtuemart/views/product/tmpl/
Hope its helps..
Does anyone know how to, without purchasing an addon/extension, add php code to the product and category descriptions? If you try to add it automatically gets commented out when you save, e.g. <!-- <?php echo "test" ?> -->
Workaround: For anyone else.. I used borderless iframe to include an external .php file which contained the php code I needed ....
I want to make a relatively simple modification to OpenCart so that if there are no Special Offers available, or applicable, that the title Special Offers does not display.
If none are available or applicable, currently it will display the heading title on a coloured background which looks odd if there are no special offers to show.
I am guessing the modification needs to be made to /catalog/controller/module/special.php and would be something like.
If special offers > 0 then do this
else
Don't do anything
But I am not sure how to implement this.
I'd be grateful if someone could advise.
Not entirely sure what you are referring to here, but you would be best editing the template not the controller file and using
<?php if($products) { echo $heading_title; } ?>
in place of what is there currently - something like just <?php echo $heading_title; ?>
Also you may find the title is surrounded by <h1> or <h2> tags. If so, just do the same but around the tags, something like
<?php if($products): ?>
<h2><?php echo $heading_title; ?></h2>
<?php endif; ?>
Hy,
I'm look for a way to do this on symfony:
I've to use a "box" a bit every where on my site... this box is resizable ... so the html/css is not simple... and i don't want to copy/paste it every where and the content of this box is not constant at all... so its not possible to make a partial template with a object variable... and pass all the content on a variable it's a bit annoying.
someyhing like this would be great:
<?PHP begin("mytemplate") ?>
"html content"
<?PHP end ?>
thanks for your help
Everywhere you need this "box" try this:
include_partial('mymodule/mypartial', array('variable1' => 'value1', 'variable2' => 'value2'));
and in your "mymodule/templates/_mypartial.php" use it like:
<div class="box"><?php echo $variable1 ?></div>
If you don't want to use partials you can use components and define each variable into the component action. Check Symfony's Components Slots (this is for v1.2 but works in v1.4).