News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Several Problems (Only Products schould show, No orderbutton is showing …)

Started by be, October 23, 2012, 21:09:33 PM

Previous topic - Next topic

be

Hello,
first greets to all, that's my first post here.

I have installed VMart and now I´m on to setup the template and I have some questions:

- How can I show all products in my market at the mainpage? I try to use the mainpage-manuitem or the category-menuitem, but on both the site starts with an overview with all categories.
How could I disable this?

- I have no displayed a order button on a product?

- I have tryed to use overrides like on other joomlasites, but on every time I add some variables the site will not be displayed.
In my example I would add a moduleposition directly in the overrides and show the siteheadings witch I can choose in the menüitem.

As example the default.php fromproductdetails

This is the original code:

<?php
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');

// addon for joomla modal Box
JHTML::_('behavior.modal');
// JHTML::_('behavior.tooltip');
$document JFactory::getDocument();
$document->addScriptDeclaration("
jQuery(document).ready(function($) {
$('a.ask-a-question').click( function(){
$.facebox({
iframe: '" 
$this->askquestion_url "',
rev: 'iframe|550|550'
});
return false ;
});
/* $('.additional-images a').mouseover(function() {
var himg = this.href ;
var extension=himg.substring(himg.lastIndexOf('.')+1);
if (extension =='png' || extension =='jpg' || extension =='gif') {
$('.main-image img').attr('src',himg );
}
console.log(extension)
});*/
});
"
);



/* Let's see if we found the product */
if (empty($this->product)) {
    echo 
JText::_('COM_VIRTUEMART_PRODUCT_NOT_FOUND');
    echo 
'<br /><br />  ' $this->continue_link_html;
    return;
}
?>


<div class="productdetails-view productdetails">
...

Now my addings

defined('_JEXEC') or die('Restricted access');

// addon for joomla modal Box
JHTML::_('behavior.modal');
// JHTML::_('behavior.tooltip');
$document = JFactory::getDocument();

$renderer = $document->loadRenderer('modules');
$options = array('style' => 'xhtml');
$position = 'banner';
echo $renderer->render($position, null);

$document->addScriptDeclaration("
jQuery(document).ready(function($) {
$('a.ask-a-question').click( function(){
$.facebox({
iframe: '" . $this->askquestion_url . "',
rev: 'iframe|550|550'
});
return false ;
});
/* $('.additional-images a').mouseover(function() {
var himg = this.href ;
var extension=himg.substring(himg.lastIndexOf('.')+1);
if (extension =='png' || extension =='jpg' || extension =='gif') {
$('.main-image img').attr('src',himg );
}
console.log(extension)
});*/
});
");



/* Let's see if we found the product */
if (empty($this->product)) {
    echo JText::_('COM_VIRTUEMART_PRODUCT_NOT_FOUND');
    echo '<br /><br />  ' . $this->continue_link_html;
    return;
}
?>

<div class="productdetails-view productdetails <?php echo $this->pageclass_sfx;?>">
<?php 
if ($this->params->get('show_page_heading'1)) : ?>
<h1 class="<?php echo $this->pageclass_sfx;?>"><?php echo $this->escape($this->params->get('page_heading')); ?></h1>
<hr class="headerseperator <?php echo $this->pageclass_sfx;?>" style="border: 1px solid #000;" width="96" />
...


Can anyone tell me how can´t i use this like in the normal joomlaoverides?

Best regards.

onnj

Have you tried the configuration in virtuemart? Shop configuration have a setting for how many products will be shown in the page. About the order button try to add stocks for a certain product then check again. . . I hope this may help you

jenkinhill

1. Use url domain.com/index.php?option=com_virtuemart&view=category&virtuemart_category_id=0

2. Assuming you mean in product details view, this is usually a setup error - use as catalogue/incorrect settings for stock control/broken template override 

3. You cannot add a module into a component view template in Joomla

In future please make one question per issue and post in the relevant forum section. Makes it more likely that someone will give up their time to attempt to provide an answer. And always mention the versions J!/VM/PHP you are using.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

be

Hi,
Quote
In future please make one question per issue and post in the relevant forum section. Makes it more likely that someone will give up their time to attempt to provide an answer. And always mention the versions J!/VM/PHP you are using.
I will consider it for the future :).

1. With this url do you mean I should link it directly to this, without using a vmart menu-type?

2. Regarding my problem with the button, I have deleted all my overrides to prevent error occured from this. But the order-button is still not visible.
I have also puplished the cart module.
Which is the view-file for the order-button e.g. it is missing?

3. Okay, and why does it works with the com_content component?

Best regards