Author Topic: add extra availability in product status  (Read 838 times)

tomsson

  • Beginner
  • *
  • Posts: 33
  • A beginner
add extra availability in product status
« on: May 30, 2017, 12:02:28 pm »
Hello

I'am using VM 3.0.18 + Joomla 3.7.2
I need extra "Availability" in product status.  It is possible ?

K&K media production

  • VirtueMart Developer Team
  • Global Moderator
  • Full Member
  • *
  • Posts: 835
  • VirtueMart Version: VM3 on J3
Re: add extra availability in product status
« Reply #1 on: May 30, 2017, 12:23:08 pm »
There is a hint on ? hover:

Availability OR select an Image to be displayed on the Details Page.
The images reside in the directory /components/com_virtuemart/assets/images/availability/

Quote
I'am using VM 3.0.18 + Joomla 3.7.2

You should update vm, because 3.0.18 is not completly compatible with J 3.7.2

tomsson

  • Beginner
  • *
  • Posts: 33
  • A beginner
Re: add extra availability in product status
« Reply #2 on: May 30, 2017, 17:41:42 pm »
I do not understand your answer.
I need to add adlist extra availability called "In stock"

dslove

  • Jr. Member
  • **
  • Posts: 55
Re: add extra availability in product status
« Reply #3 on: June 06, 2017, 11:04:24 am »
tomsson, do you need something like what appears in the attached screenshot?

tomsson

  • Beginner
  • *
  • Posts: 33
  • A beginner
Re: add extra availability in product status
« Reply #4 on: June 07, 2017, 21:53:43 pm »
yes!!!

I got it now  :)

thx

dslove

  • Jr. Member
  • **
  • Posts: 55
Re: add extra availability in product status
« Reply #5 on: June 07, 2017, 23:01:39 pm »
Great! :)
If anyone else needs help with this, they can post here & I will be happy to share the code.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9533
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: add extra availability in product status
« Reply #6 on: June 13, 2017, 00:30:03 am »
sounds good. :-)
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Evgen78

  • Beginner
  • *
  • Posts: 7
Re: add extra availability in product status
« Reply #7 on: March 29, 2018, 22:27:53 pm »
Great! :)
If anyone else needs help with this, they can post here & I will be happy to share the code.

Hi!

I do!

how is it done?

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 2893
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: add extra availability in product status
« Reply #8 on: March 29, 2018, 23:24:08 pm »
Evgen78, It depend the template and your Joomla release, the products layout need change.
But in productdetails view, you have a sample code to display stock.

dslove

  • Jr. Member
  • **
  • Posts: 55
Re: add extra availability in product status
« Reply #9 on: March 30, 2018, 08:12:30 am »
This is how I did it:

1) In the sublayouts/products.php file (category view of product), inside the product container and right after the code for the thumbnail, I placed the following piece of code

Code: [Select]
<span class="label label-default vmicon vm2-<?php echo $product->stock->stock_level ?> small" title="<?php echo $product->stock->stock_tip ?>">Stock</span>
When the product is in stock, the HTML output will be:

Code: [Select]
<span class="label label-default vmicon vm2-normalstock small" title="We have plenty of stock for this product">Stock</span>
When product is out of stock, HTML output is:

Code: [Select]
<span class="label label-default vmicon vm2-nostock small" title="Sorry, we currently have no stock for this item">Stock</span>
2) Now, it's time to create the CSS styles for your HTML. Most of the above classes (.label .label-default .small) are standard Bootstrap classes (the framework I used for the specific template), but the finishing touch was done with Font Awesome (already included in the template, because it's neat and I love it):

Code: [Select]

.vm2-normalstock::after {
    margin-left: 6px;
    font-family: 'FontAwesome';
    content: '\f00c';
    font-size: 20px;
    color: #5cb85c;
}

.vm2-nostock::after {
    margin-left: 6px;
    font-family: 'FontAwesome';
    content: '\f00d';
    font-size: 20px;
    color: #FF0000;
}


Hope this helps :)