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

PROBLEM in VIEW -> categories dont work!?

Started by lipes, April 14, 2012, 18:02:19 PM

Previous topic - Next topic

lipes

This work:
<?php if (JRequest::getVar('view')=='productdetails') { ?><jdoc:include type="modules" name="lat1" /><?php } ?>
<?php if (JRequest::getVar('view')=='category') { ?><jdoc:include type="modules" name="lat2" /><?php } ?>

:( THIS DONT WORK
<?php if (JRequest::getVar('view')=='categories') { ?><jdoc:include type="modules" name="lat3" /><?php } ?>

Categories view is for what? I was thinking that was to display all categories without products like we got in view www./index.php?option=com_virtuemart  But NOT :|

The www./index.php?option=com_virtuemart must be connected to: www./index.php?option=com_virtuemart&view=categories
and not: www./index.php?option=com_virtuemart&view=category
Right ??
.....
I've discover this because I want to apply a Joomla Custom Module Banner in Categories View (not in Product Category View) and we can do that.
To see my Banner I've tested to write www./ index.php?option=com_virtuemart&view=categories  and I can See that Banner is there!
Works perfect until change to Category View here ( index.php?option=com_virtuemart&view=category&virtuemart_category_id=2 ) ..
But i can put Categories View working by default url!!  :'(

And if we click in any 1st level Category here: www./index.php?option=com_virtuemart&view=categories (Can see the banner)
we will see something this: www./index.php?option=com_virtuemart&view=categories&virtuemart_category_id=1 (Can see the banner)

But we cannot see on this VM default url situation:
www./index.php?option=com_virtuemart&view=category&virtuemart_category_id=1 or
www./index.php?option=com_virtuemart&view=category or
www./index.php?option=com_virtuemart

Any Solution, please?!
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

lipes

#1
I've changed this to my test site works in Categories and Category or in the default i could have Image and links working:

in com_virtuemart/views/virtuemart/tmpl/default_categories.php
line46
    // Category Link
    $caturl = JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id=' . $category->virtuemart_category_id);
    // Show Category
    ?>
    <div class="category floatleft<?php echo $category_cellwidth $show_vertical_separator ?>">
        <div class="spacer">
    <h2>
        <a href="<?php echo $caturl ?>" title="<?php echo $categories->category_name ?>">
    <?php echo $categories->category_name ?>


to
    // Category Link
    $caturl = JRoute::_('index.php?option=com_virtuemart&view=categories&virtuemart_category_id=' . $category->virtuemart_category_id);
    // Show Category
    ?>
    <div class="category floatleft<?php echo $category_cellwidth $show_vertical_separator ?>">
        <div class="spacer">
    <h2>
        <a href="<?php echo $caturl ?>" title="<?php echo $category->category_name ?>">
     <?php echo $category->category_name ?>


and in com_virtuemart/views/category/tmpl/default.php
// Category Link
$caturl = JRoute::_ ( 'index.php?option=com_virtuemart&view=category&virtuemart_category_id=' . $category->virtuemart_category_id );
// Show Category ?>
<div class="category floatleft<?php echo $category_cellwidth $show_vertical_separator ?>">
<div class="spacer">
<h2>
<a href="<?php echo $caturl ?>" title="<?php echo $category->category_name ?>">
<?php echo $category->category_name ?>


to:
// Category Link
$caturl = JRoute::_ ( 'index.php?option=com_virtuemart&view=categories&virtuemart_category_id=' . $category->virtuemart_category_id );
// Show Category ?>
<div class="category floatleft<?php echo $category_cellwidth $show_vertical_separator ?>">
<div class="spacer">
<h2>
<a href="<?php echo $caturl ?>" title="<?php echo $categories->category_name ?>">
<?php echo $categories->category_name ?>


So only works this way works in my test site in displaying all pictures fine + the text Categories / category and correct link
From the 1st Main VM Categories intro page ( index.php?option=com_virtuemart )
-> Categories (1st Level)
-> Sub Categories (2nd Level)
-> to Product Details page
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

PRO

lipes, are you asking something? I dont understand

lipes

Hi Banquet.
I dont know if you remember this post: http://forum.virtuemart.net/index.php?topic=94953.msg332471#msg332471 when i've talked about adding a lateral Left Side (Joomla Custom HTML Module) in the VM Categories View, VM Category View and also in VM Product Details View...
I've tryed some solutions but with the normal VM template in categories or in category template files that doesnt work well...

So i did some changes to the default code to try to work better by removing the 'category' word and add 'categories' to the url .... this is so confusing because (in fact) at this time i dont know why i have to do this...
For me (understanding the meaning) Categories are a group with many Category names... And Category its only one group name ... right?
And we have also in VM the 1st place of Categories Groups in the url: index.php?option=com_virtuemart
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

PRO

lipes,
modules will NOT display "inside" of vmart.

On top of
Left of
Right Of
Below of

only


and please, in a couple sentences ONLY tell me what you are trying to do? and whats happening?






lipes

yes you're right... sometimes i dont know the correct words to write and explain better  :-X sorry !!
the custom mod its in Left side of the joomla template <div..>, not inside VM :)
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

PRO

Quote from: lipes on April 25, 2012, 22:19:41 PM
yes you're right... sometimes i dont know the correct words to write and explain better  :-X sorry !!
the custom mod its in Left side of the joomla template <div..>, not inside VM :)

ok, but what is the problem u are having

lipes

with this changes
Quote from: lipes on April 25, 2012, 18:01:58 PM
I've changed this to my test site works in Categories and Category or in the default i could have Image and links working:

in com_virtuemart/views/virtuemart/tmpl/default_categories.php
line46
    // Category Link
    $caturl = JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id=' . $category->virtuemart_category_id);
    // Show Category
    ?>
    <div class="category floatleft<?php echo $category_cellwidth $show_vertical_separator ?>">
        <div class="spacer">
    <h2>
        <a href="<?php echo $caturl ?>" title="<?php echo $categories->category_name ?>">
    <?php echo $categories->category_name ?>


to
    // Category Link
    $caturl = JRoute::_('index.php?option=com_virtuemart&view=categories&virtuemart_category_id=' . $category->virtuemart_category_id);
    // Show Category
    ?>
    <div class="category floatleft<?php echo $category_cellwidth $show_vertical_separator ?>">
        <div class="spacer">
    <h2>
        <a href="<?php echo $caturl ?>" title="<?php echo $category->category_name ?>">
     <?php echo $category->category_name ?>


and in com_virtuemart/views/category/tmpl/default.php
// Category Link
$caturl = JRoute::_ ( 'index.php?option=com_virtuemart&view=category&virtuemart_category_id=' . $category->virtuemart_category_id );
// Show Category ?>
<div class="category floatleft<?php echo $category_cellwidth $show_vertical_separator ?>">
<div class="spacer">
<h2>
<a href="<?php echo $caturl ?>" title="<?php echo $category->category_name ?>">
<?php echo $category->category_name ?>


to:
// Category Link
$caturl = JRoute::_ ( 'index.php?option=com_virtuemart&view=categories&virtuemart_category_id=' . $category->virtuemart_category_id );
// Show Category ?>
<div class="category floatleft<?php echo $category_cellwidth $show_vertical_separator ?>">
<div class="spacer">
<h2>
<a href="<?php echo $caturl ?>" title="<?php echo $categories->category_name ?>">
<?php echo $categories->category_name ?>


So only works this way works in my test site in displaying all pictures fine + the text Categories / category and correct link
From the 1st Main VM Categories intro page ( index.php?option=com_virtuemart )
-> Categories (1st Level)
-> Sub Categories (2nd Level)
-> to Product Details page

for now i dont have..
i only posted this things because sometimes i forget to save my files (in override) template... and this is like a log tool to save me from losing again all work that i've been done since november/dezember '11 :) 
I hope to finish my fathers site later this year .. lol
the last things i have to do is testing the shop orders.. the e-mails configurations etc.. i've cant do test with ampps localhost.. and i even have to search a cheap hosting.. and buy a domain.. argh.. so many work :'|
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25