- Posts: 110
- Thank you received: 0
Include a small bit of text and buy now button
- deborahharrison
-
Topic Author
- Offline
At the moment, I have my products listed under category as just the image and the title. Is it possible I could include a small bit of text
Basically we sell books and we would like to list in the following layout:
Image - then Title.
Author Name
Save 20% off RRP save £...
Add to cart button
Can that be done?
Please advise how I can go about that.
Please Log in or Create an account to join the conversation.
You can customize the file listing_img_title of the view product via the menu Display->Views for that. You can add text directly there. If you need to add text based on the product, you will have to create custom product fields (via the menu Display->Custom fields in our commercial versions) so that you can enter the information in the products and then use it in that view (with some PHP code like this: echo $row->CUSTOM_FIELD_COLUMN_NAME; ).
Please Log in or Create an account to join the conversation.
- deborahharrison
-
Topic Author
- Offline
- Posts: 110
- Thank you received: 0
Are you saying I would need to buy the commercial software in order to achieve this? Please advise if so and how much it would be?
Please Log in or Create an account to join the conversation.
You can see a features list there: www.hikashop.com/en/hikashop.html
Please Log in or Create an account to join the conversation.
- deborahharrison
-
Topic Author
- Offline
- Posts: 110
- Thank you received: 0
Also can I change the layout so all the title, etc wraps to the left of the image rather than appearing centred below it?
Sorry about this! :silly:
Please Log in or Create an account to join the conversation.
I don't know what you want to have with this save 20% link. Does that need to go to a special page ?
I see that you want an author name, so you will need the custom product fields anyway.
The layout can be changed in the file listing_img_title of the view product via the menu Display->Views
You might also be able to customize the style by editing the CSS of hikashop in the config under the tab display.
Please Log in or Create an account to join the conversation.
- deborahharrison
-
Topic Author
- Offline
- Posts: 110
- Thank you received: 0
So It will vary depending on item.
Hope this helps.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- deborahharrison
-
Topic Author
- Offline
- Posts: 110
- Thank you received: 0
However my code for listing_img_title I am still confused about. Below is the existing code:
<?php
/**
* @package HikaShop for Joomla!
* @version 1.4.4
* @author hikashop.com
* @copyright (C) 2010 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?>
<?php $link = hikashop::completeLink('product&task=show&cid='.$this->row->product_id.'&name='.$this->row->alias.$this->itemid.$this->category_pathway);
if($this->config->get('thumbnail')){ ?>
<div style="height:<?php echo $this->image->main_thumbnail_y;?>px;text-align:center;clear:both;" class="hikashop_product_image">
<?php if($this->params->get('link_to_product_page',1)){ ?>
<a href="<?php echo $link;?>">
<?php }
echo $this->image->display(@$this->row->file_path,false,$this->escape($this->row->product_name));
if($this->params->get('link_to_product_page',1)){ ?>
</a>
<?php } ?>
</div>
<?php
}
if($this->params->get('show_price')){
$this->setLayout('listing_price');
echo $this->loadTemplate();
}
?>
<span class="hikashop_product_name">
<?php if($this->params->get('link_to_product_page',1)){ ?>
<a href="<?php echo $link;?>">
<?php }
echo $this->row->product_name;
if($this->params->get('link_to_product_page',1)){ ?>
</a>
<?php } ?>
</span>
<?php
if($this->params->get('add_to_cart')){
?>
<form action="<?php echo hikashop::completeLink('product&task=updatecart'); ?>" method="post" name="hikashop_product_form_<?php echo $this->row->product_id.'_'.$this->params->get('main_div_name'); ?>"><?php
$this->ajax='';
$this->setLayout('quantity');
echo $this->loadTemplate();
?>
<input type="hidden" name="product_id" value="<?php echo $this->row->product_id; ?>" />
<input type="hidden" name="add" value="1"/>
<input type="hidden" name="ctrl" value="product"/>
<input type="hidden" name="task" value="updatecart"/>
</form><?php
}?>
Sorry to sound thick but what and where do I need to add everything. In my defence I have flu.
Thanks
Please Log in or Create an account to join the conversation.
Besides, we answer questions but we don't program custom views on the forum... I hope you understand...
Please Log in or Create an account to join the conversation.
- deborahharrison
-
Topic Author
- Offline
- Posts: 110
- Thank you received: 0
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- deborahharrison
-
Topic Author
- Offline
- Posts: 110
- Thank you received: 0
Please Log in or Create an account to join the conversation.
<?php
}
if($this->params->get('show_price')){
$this->setLayout('listing_price');
echo $this->loadTemplate();
}
?>
with the code:
<span class="hikashop_product_name">
<?php if($this->params->get('link_to_product_page',1)){ ?>
<a href="<?php echo $link;?>">
<?php }
echo $this->row->product_name;
if($this->params->get('link_to_product_page',1)){ ?>
</a>
<?php } ?>
</span>
Please Log in or Create an account to join the conversation.
- deborahharrison
-
Topic Author
- Offline
- Posts: 110
- Thank you received: 0
And its works on all but one listing. 212.113.133.235/~englishr/index.php?opti...ce-fiction&Itemid=53 Or does it take a bit of time to take effect?
Please advise.
Please Log in or Create an account to join the conversation.
span.hikashop_product_name {
margin-left: 5px;
font-weight: bold;
float: left;
display: block;
margin-bottom: 5px;
}
Please Log in or Create an account to join the conversation.
- deborahharrison
-
Topic Author
- Offline
- Posts: 110
- Thank you received: 0
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- deborahharrison
-
Topic Author
- Offline
- Posts: 110
- Thank you received: 0
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.