Include a small bit of text and buy now button

  • Posts: 110
  • Thank you received: 0
13 years 9 months ago #7438

Hi

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.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
13 years 9 months ago #7448

Hi,

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.

  • Posts: 110
  • Thank you received: 0
13 years 9 months ago #7459

Hi Nicolas I can create custom fields in my non-commercial version but only for address.

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.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
13 years 9 months ago #7461

If you don't need different information for different products, you don't need our commercial versions and you can just edit the view. However, if you want to add additional information fields to your products you will indeed need one of our commercial versions. The Essential version costs €49.95 and the Business version €99.90

You can see a features list there: www.hikashop.com/en/hikashop.html

Please Log in or Create an account to join the conversation.

  • Posts: 110
  • Thank you received: 0
13 years 9 months ago #7463

Well as I said, I need a Save 20% link and the value that saved and a Add to Cart button. So yes it probably would be custom. AM I mistaken

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:

Last edit: 13 years 9 months ago by deborahharrison.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
13 years 9 months ago #7469

The add to cart button can be added by turning on the corresponding option in your module/menu's hikashop options (you should be able to access them via the menus Display->Content menus and Display->Content modules).
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.

  • Posts: 110
  • Thank you received: 0
13 years 9 months ago #7473

20% is not a specific link its just like saying "buy this off this website and make a saving of, for example £10.50

So It will vary depending on item.

Hope this helps.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
13 years 9 months ago #7476

Well, you can create discounts via the menu System->Discounts and restrict them to a product or a category of products (in commercial versions of HikaShop). You can also tweak the options of your module/menu and the translations to display the discount message as you want. So I don't think that you need to edit the views for the discount itself.

Please Log in or Create an account to join the conversation.

  • Posts: 110
  • Thank you received: 0
13 years 9 months ago #7526

OK I shall leave that for now.

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

Last edit: 13 years 9 months ago by deborahharrison.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
13 years 9 months ago #7534

As I said, to show the discount, you don't need to edit the view. If you want to move around things in the view or add stuff in it we cant really help you without more precise questions.

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.

  • Posts: 110
  • Thank you received: 0
13 years 9 months ago #8642

Hi Nicolas sorry to be a pain, but is there any documentation that could talk me through how to configure this?

Last edit: 13 years 9 months ago by deborahharrison.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
13 years 9 months ago #8643

There is no such documentation but as I said, if you ask precise questions like "I want do revert the name and the price, how can I do ?", we can answer you.

Please Log in or Create an account to join the conversation.

  • Posts: 110
  • Thank you received: 0
13 years 9 months ago #8748

Ok. Step by step. If you look at http://212.113.133.235/~englishr/index.php?option=com_hikashop&ctrl=category&task=listing&cid=22&name=literary-criticism&Itemid=53 the price appears before the title. How can I change this so the book title appears first and the price underneath?

Last edit: 13 years 9 months ago by deborahharrison.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
13 years 9 months ago #8756

You can just switch the code:

<?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.

  • Posts: 110
  • Thank you received: 0
13 years 9 months ago #8832

I have swapped these around under Display > Views > product > listing_img_title

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.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
13 years 9 months ago #8835

The price and the name are switched. But there is a float:left; in you CSS on the product name which you should remove (just the float:left; line):
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.

  • Posts: 110
  • Thank you received: 0
13 years 9 months ago #8837

Great that works. the component creates an add to cart link for each product. How can I change this to an add to cart button?

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
13 years 9 months ago #8838

Unless you activated the "catalogue mode" option in the config under the tab display, you should not need to add the "add to cart" html in your product description. The add to cart button should be generated automatically by HikaShop.

Please Log in or Create an account to join the conversation.

  • Posts: 110
  • Thank you received: 0
13 years 9 months ago #8842

Sorry I must be thick, Under System > Configuration then where? :unsure:

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
13 years 9 months ago #8846

under the display tab.

Please Log in or Create an account to join the conversation.

Time to create page: 0.091 seconds
Powered by Kunena Forum