blank head tag in category page if i replace default.php with edited default.php

Started by skhn123, May 29, 2014, 13:28:07 PM

Previous topic - Next topic

skhn123

Hello Everyone,

i am using VM 2.6.0 also i am using override for category pages and its working fine but when i try to add some custom code in it. It goes white and the Head tag is blank so no style or JavaScript and it just showing only category title, one product picture and shorting option that's it.

i was using joomla cache before but now i have disable it.

please help me.
Sadique.

[attachment cleanup by admin]

jenkinhill

So whatever custom code you add is not correct and causes an error. As you don't show what code you were adding and why, nobody can help.
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

skhn123

oh sorry for that (my bad)

i add some code to display second image of product in category page, here is the complete code for image display:

<div class="prod-img">
<a title="<?php echo $product->product_name ?>" rel="vm-additional-images" href="<?php echo $product->link?>">
<?php
echo $product->images[0]->displayMediaThumb('class="browseProductImage"'false); ?>

                           
                            <?php
echo $product->images[1]->displayMediaThumb('class="browseProductImage flip"'false); ?>

</a>
</div>

skhn123


GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

skhn123

hello GJC

i add these two codes to display two (first and second) images of same product:
for first image:
<?php echo $product->images[0]->displayMediaThumb('class="browseProductImage"'false); ?>

for second image:
<?php echo $product->images[1]->displayMediaThumb('class="browseProductImage flip"'false); ?>

and its working almost fine in localhost in every category except for just one category i dont know why. but when i upload it to my live server it makes all category looks like same as i attached in my previous post.

skhn123

hey GJC,

I just found out what was the problem. actually some of my product don't have second image or we could say additional images. thats why it was working weird. now because of this a new question has arise that how to check if it has any additional image then apply this code:

<?php echo $product->images[1]->displayMediaThumb('class="browseProductImage flip"'false); ?>

do you have any solution?
please help.

GJC Web Design

Come on - you have to learn some coding if you want to code!!!!!

2 mins on Google will tell you!!! You can't just continue to ask others to code your site for you.....

if($product->images[1]) {

$product->images[1]->displayMediaThumb('class="browseProductImage flip"', false);

}
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

skhn123

hey GJC

:( Sorry for late update but actually i already accomplice that (and yes Google did help me  ;) ) but anyway thanks for your time and support i really appreciate it.