Product Quantity and Product Display

  • Posts: 15
  • Thank you received: 2
11 years 7 months ago #130306

Hi, I have managed to add the product quantity field to the Category Display of all products by using the code:

$this->params->set('show_quantity_field', 1);

This puts in a nice quantity box except it is way too big for the listing and just makes it over sized? Is there a way to make this smaller?

Also, is there a way of disabling the link to a single product page because I just want people to look at the category view and see all the products in that category and then from here they can choose quantities and add them to their cart.

Thanks, Dom.

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

  • Posts: 12953
  • Thank you received: 1778
11 years 7 months ago #130358

Hi,
1. Sure you'll be able to re-size your quantity box by using some CSS code.
2. You'll just have to just have to edit the content menu/module of your product listing through "Hikashop->Display->Content modules/menus", and set the Link to the product page option to NO.

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

  • Posts: 15
  • Thank you received: 2
11 years 7 months ago #130363

Thanks for your reply. Is there any chance you could give me the CSS tags for the quantity box on the product page? I have already looked through the CSS code and changed the quantity box width to 10px but this did nothing.

www.dhdesign.org.uk/taste/index.php/wine/champagne this is the page I am wanting it on. I have disabled the function at the minute because it looked silly!

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

  • Posts: 12953
  • Thank you received: 1778
11 years 7 months ago #130388

I can't really help you if you disable the modifications that you've made, can you put them back so I can see what CSS code you'll need to apply ?

Last edit: 11 years 7 months ago by Mohamed Thelji.

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

  • Posts: 15
  • Thank you received: 2
11 years 7 months ago #130536

Sorry, I have put them back now. If you could help me this would be very kind of you.

Thanks.

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

  • Posts: 83995
  • Thank you received: 13605
  • MODERATOR
11 years 7 months ago #130561

This issue comes from your template CSS:

textarea, input, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"] {
color: #6e6e6e;
background-color: #ffffff;
border: 1px solid #d5d5d5;
border-radius: 4px;
padding: 4px 8px;
margin: 0;
vertical-align: middle;
width: auto;
}
in www.dhdesign.org.uk/taste/templates/rt_a...fe9776dc07b12281.css
Please ask your template provider how to properly remove that code and it will display with a normal width.

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

  • Posts: 53
  • Thank you received: 0
11 years 7 months ago #131102

domhan wrote: Hi, I have managed to add the product quantity field to the Category Display of all products by using the code:

$this->params->set('show_quantity_field', 1);

This puts in a nice quantity box except it is way too big for the listing and just makes it over sized? Is there a way to make this smaller?

Also, is there a way of disabling the link to a single product page because I just want people to look at the category view and see all the products in that category and then from here they can choose quantities and add them to their cart.

Thanks, Dom.


What file did you add the code to?

I need to do the same thing.

Thanks,

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

  • Posts: 15
  • Thank you received: 2
11 years 7 months ago #131111

Hi there,

You go to the Hikashop component. Then on the top tabs, Display > Views.

Then at the top right there are some drop down menu's, Select "Product" and then in the middle one select your template. This will bring up a list of different views. Find the one called "listing_img_title" Open it.

Then scroll down until you see:

<!-- ADD TO CART BUTTON AREA -->
<?php
if($this->params->get('add_to_cart') || $this->params->get('add_to_wishlist')){ 
  $this->setLayout('add_to_cart_listing');
  echo $this->loadTemplate();
}?>
<!-- EO ADD TO CART BUTTON AREA -->

I just added that line of code so mine looks like this.
<!-- ADD TO CART BUTTON AREA -->
<?php
if($this->params->get('add_to_cart') || $this->params->get('add_to_wishlist')){
  $this->params->set('show_quantity_field', 1);  
  $this->setLayout('add_to_cart_listing');
  echo $this->loadTemplate();
}?>
<!-- EO ADD TO CART BUTTON AREA -->

Thanks, Dom.

The following user(s) said Thank You: Xavier, teleactive

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

Time to create page: 0.065 seconds
Powered by Kunena Forum