- Posts: 222
- Thank you received: 1
product stock count only on product page
10 years 11 months ago #217248
by Vero
product stock count only on product page was created by Vero
-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.4
Hi,
I don't want to display product stock count on products listing page en want to display it only on product page. Now it is displaying everywhere. What have I to change?
-- Joomla version -- : 3.4.4
Hi,
I don't want to display product stock count on products listing page en want to display it only on product page. Now it is displaying everywhere. What have I to change?
Please Log in or Create an account to join the conversation.
10 years 11 months ago #217257
by nicolas
Replied by nicolas on topic product stock count only on product page
Hi,
In that case, you need to change the code:
to:
in the file "quantity" of the view "product" via the menu Display>Views.
In that case, you need to change the code:
Code:
if($this->row->product_quantity == 1 && JText::_('X_ITEM_IN_STOCK') != 'X_ITEM_IN_STOCK')
$text = JText::sprintf('X_ITEM_IN_STOCK', $this->row->product_quantity);
else
$text = JText::sprintf('X_ITEMS_IN_STOCK', $this->row->product_quantity);
Code:
if(!empty($this->element->product_id)){
if($this->row->product_quantity == 1 && JText::_('X_ITEM_IN_STOCK') != 'X_ITEM_IN_STOCK')
$text = JText::sprintf('X_ITEM_IN_STOCK', $this->row->product_quantity);
else
$text = JText::sprintf('X_ITEMS_IN_STOCK', $this->row->product_quantity);
}
Please Log in or Create an account to join the conversation.
10 years 11 months ago - 10 years 11 months ago #217369
by Vero
Replied by Vero on topic product stock count only on product page
Thanks, but now it displays no the text, but it still displays product stock count ( the area with css: background with a border) .
Last edit: 10 years 11 months ago by Vero.
Please Log in or Create an account to join the conversation.
10 years 11 months ago #217382
by Xavier
Replied by Xavier on topic product stock count only on product page
Hi,
This seems to be coming from another view override, the code given by Nicolas remove the text and the value at once, and not only the text or only the value. So there is another code generating this display, and this is not a default HikaShop code.
Please give a link to a page with the issue.
This seems to be coming from another view override, the code given by Nicolas remove the text and the value at once, and not only the text or only the value. So there is another code generating this display, and this is not a default HikaShop code.
Please give a link to a page with the issue.
Please Log in or Create an account to join the conversation.
10 years 11 months ago #217488
by Vero
Replied by Vero on topic product stock count only on product page
Please Log in or Create an account to join the conversation.
10 years 11 months ago #217490
by Xavier
Replied by Xavier on topic product stock count only on product page
Hi,
So it is a css issue due to the property:
in the frontend_custom css file under Configuration > Display > CSS.
I think that you have to replace this property by:
So it is a css issue due to the property:
Code:
.hikashop_product_stock_count {
float: right !important;
margin-top: 20px !important;
margin-bottom: 20px !important;
padding: 7px 10px;
border: 2px solid #008000;
color: #008000;
line-height: 125%;
}
I think that you have to replace this property by:
Code:
.hikashop_product_page .hikashop_product_stock_count {
float: right !important;
margin-top: 20px !important;
margin-bottom: 20px !important;
padding: 7px 10px;
border: 2px solid #008000;
color: #008000;
line-height: 125%;
}
The following user(s) said Thank You: Vero
Please Log in or Create an account to join the conversation.
10 years 11 months ago #217578
by Vero
Replied by Vero on topic product stock count only on product page
thanks!
Please Log in or Create an account to join the conversation.
Time to create page: 0.256 seconds