Regards, Fido-X.
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Im using opencart_v0.7.7. Will this work on opencart_v0.7.7?
UPDATE: IT WORKS!!!! Although I got some errors. I just delete the code below that has [delete][delete].
Code: Select all
<script type="text/javascript" src="catalog/javascript/ajax/jquery.js"></script>
<script type="text/javascript" src="catalog/javascript/thickbox/thickbox-compressed.js"></script>
<link rel="stylesheet" type="text/css" href="catalog/javascript/thickbox/thickbox.css" />
<link rel="stylesheet" type="text/css" href="catalog/template/default/css/home.css" />
<div class="heading"><?php echo $heading_title; ?></div>
[delete]<?php echo $text_greeting; ?>[delete]
<?php foreach ($homepage as $homepage_info) { ?>
<?php if ($homepage_info['sort_order'] % 2 != 1) { $float = $text_left; } else { $float = $text_right; } ?>
<div class="homepage">
<?php if ($homepage_info['image_id'] > 0) { ?>
<div class="homepage_image" style="float:<?php echo $float; ?>;">
<a href="<?php echo $homepage_info['filename']; ?>" title="<?php echo $homepage_info['title']; ?>" class="thickbox">
<img src="<?php echo $homepage_info['thumb']; ?>" title="<?php echo $homepage_info['title']; ?>" alt="<?php echo $homepage_info['title']; ?>" />
</a>
</div>
<?php } ?>
<div class="homepage_heading"><?php echo $homepage_info['title']; ?></div>
<div class="homepage_story"><?php echo $homepage_info['description']; ?></div>
</div>
<?php } ?>
[delete]<div class="heading"><?php echo $text_latest; ?></div>
<?php foreach ($products as $product) { ?>
<div class="products">
<a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a><br />
<b><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></b><br />
<?php echo $product['price']; ?>
</div>
<?php } ?>[delete]
There are 3 tab: The General, Data and Image.
Everytime i view the homepage theres an image above my entry. How can remove this man?
UPDATE: hehehe.. Its okay now... I just commented the PHP code that calls the image hehehe.
Glad to hear you got it working. Sorry about the errors - the controller in the package has had the "text_greeting" and Latest Products removed - I didn't actually mean to, must have taken the controller from my own setup and put that into the package instead of making the changes to the controller from a default setup. Thanks for letting me know about the errors, I'll update the package to fix them (when I get a chance

As for the image issue, this is a problem with OpenCart. It seems that whenever you add/edit some entry that has provision to add an image (eg. categories, products), the first image will ALWAYS be added, whether you want one or not.
To prevent display of the image, you can change the line that reads-
Code: Select all
<?php if ($homepage_info['image_id'] > 0) { ?>
Code: Select all
<?php if ($homepage_info['image_id'] > 1) { ?>
Regards, Fido-X.
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
ADDENDUM: I changed the 0 to 100, and now it works, the image does not show on the page.
I'd like to remove it all together and simply put images in the editor for the page if I want to see one.
Please advise. Thanks.
Code: Select all
<?php if ($homepage_info['image_id'] > 1) { ?>
<div class="homepage_image" style="float:<?php echo $float; ?>;">
<a href="<?php echo $homepage_info['filename']; ?>" title="<?php echo $homepage_info['title']; ?>" class="thickbox">
<img src="<?php echo $homepage_info['thumb']; ?>" title="<?php echo $homepage_info['title']; ?>" alt="<?php echo $homepage_info['title']; ?>" />
</a>
</div>
<?php } ?>
Regards, Fido-X.
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Users browsing this forum: No registered users and 1 guest