News:

Looking for documentation? Take a look on our wiki

Main Menu

Browse page templateing and other problems...

Started by lz1kka, October 15, 2011, 03:04:42 AM

Previous topic - Next topic

jjk

Look for <div class="width30 floatright"> around line 209 and <div class="width70 floatright"> around line 232 in the file ...\components\com_virtuemart\views\category\tmpl\default.php (or your renamed copy of this file)
I've set mine to 100 and 95
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

lz1kka


lz1kka

Looked at the file several times but couldn't find content like this: <div class="width30 floatright"> or <div class="width70 floatright">
It is a little strange...

jjk

Ah - a small copy and paste error  ;D
line 209 is: <div class="width30 floatleft center">
line 232 is: <div class="width70 floatright">
(unless you changed one of them already)

If you don't find this, you are looking at the wrong file  ;)
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

lz1kka

Bad news... I can't find these codes anywhere  :-\
I opened the original default.php file and there aren't these lines too.
In my file I found this:
// Show Products ?>
<div class="product floatleft<?php echo $Browsecellwidth $show_vertical_separator ?>">
<div class="spacer">

<?php /** @todo make image popup */
echo $product->images[0]->displayMediaThumb('class="browseProductImage" border="0" title="'.$product->product_name.'" ',true,'class="modal"');
?>



PRO

because you are looking at the picture. YOU are trying to change the text div.

The name
product_name

the short description
product_s_desc


lz1kka

If I trust FireBug, I have to change this code in file vmsite-ltr.css:
.width26 {
    width: 26%;
}
.width27 {
    width: 27%;
}
.width28 {
    width: 28%;
}
.width29 {
    width: 29%;
}
.width30 {
    width: 30%;
}
.width31 {
    width: 31%;
}
.width32 {
    width: 32%;
}
.width33 {
    width: 33%;


.width30 {
    width: 100%;

Will it be correct?

jjk

No, that would probably mess up you layout even more. Looks to me like you followed BanquetTables.pro's earlier advice already:
http://forum.virtuemart.net/index.php?topic=92010.msg302765#msg302765 (mixing two different solution won't work)
BTW - BanquetTables.pro understands code better than I do. Therefore my suggestions are more likely the simple stupid aproach.  ;D

The original lines I was talking about are these:
// Show Products ?>
<div class="product floatleft<?php echo $Browsecellwidth $show_vertical_separator ?>">
<div class="spacer">
<div class="width30 floatleft center">
<?php /** @todo make image popup */
echo $product->images[0]->displayMediaThumb('class="browseProductImage" border="0" title="'.$product->product_name.'" ',true,'class="modal"');
?>



<!-- The "Average Customer Rating" Part -->
<?php if (VmConfig::get('pshop_allow_reviews') == 1) { ?>
<span class="contentpagetitle"><?php echo JText::_('COM_VIRTUEMART_CUSTOMER_RATING'?>:</span>
<br />
<?php
// $img_url = JURI::root().VmConfig::get('assets_general_path').'/reviews/'.$product->votes->rating.'.gif';
// echo JHTML::image($img_url, $product->votes->rating.' '.JText::_('COM_VIRTUEMART_REVIEW_STARS'));
// echo JText::_('COM_VIRTUEMART_TOTAL_VOTES').": ". $product->votes->allvotes; ?>

<?php ?>


<div class="paddingtop8">
<span class="vmicon vm2-<?php echo $product->stock->stock_level ?>" title="<?php echo $product->stock->stock_tip ?>"></span>
<span class="stock-level"><?php echo JText::_('COM_VIRTUEMART_STOCK_LEVEL_DISPLAY_TITLE_TIP'?></span>
</div>
</div>

<div class="width70 floatright">

<h2><?php echo JHTML::link($product->link$product->product_name); ?></h2>

<?php // Product Short Description


Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

lz1kka

#23
YES!! I WIN!  ;D
Now I have big and beautiful thumbnail image and centered title, price and button.
I changed directly the default.php because my custom file was absolutely different (may be my mistake)

I have another problem that you may know decision. I need different product colors. The problem is that when I add new color variations with the same price as the original main product (value 0) it show me on the site "Color black: free Color white: free". I want just to be a dropdown menu with options, but when I try to configure in "Custom fields" it didn't work properly.


lz1kka

Quote from: BanquetTables.pro on October 18, 2011, 13:10:19 PM
http://forum.virtuemart.net/index.php?topic=90833.msg298101#msg298101

BanquetTables.pro thank you! The link is useful!I changed the look of color dropdown and removed the text "free" from the .ini language file.
Unfortunately now I found other problem with the "Ask a question about this product" button. It's opening the form with email and text, but when you click on submit button it show an errors:

Warning: require(/home/twelvegr/public_html/royalbags/components/com_virtuemart/controllers/askquestion.php) [function.require]: failed to open stream: No such file or directory in /home/twelvegr/public_html/royalbags/components/com_virtuemart/helpers/shopfunctionsf.php on line 272

Fatal error: require() [function.require]: Failed opening required '/home/twelvegr/public_html/royalbags/components/com_virtuemart/controllers/askquestion.php' (include_path='/usr/local/php4/lib/php:.:/usr/lib/php:/usr/local/lib/php') in /home/twelvegr/public_html/royalbags/components/com_virtuemart/helpers/shopfunctionsf.php on line 272


What about this?

jjk

Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

lz1kka

Ohh... yeah...
You have to know that I'm not lazy, just seems that I can't use the search correctly.  ::)

PRO

Quote from: lz1kka on October 20, 2011, 13:12:09 PM


BanquetTables.pro thank you! The link is useful!I changed the look of color dropdown and removed the text "free" from the .ini language file.

dont change the file in the language file.

COPY the line of text.

The go to language/overrides/en-GB.override.ini

PASTE the Line of text in that file changed to what you want.

The original vmart language file will be overwritten IF an update has changed to that file.


jjk

Quote from: BanquetTables.pro on October 20, 2011, 15:30:59 PM
The go to language/overrides/en-GB.override.ini

Thanks for this hint - although I've clicked on the language folders hundreds of times, I never noticed the language/overrides folder  :-[ ;D
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations