News:

Looking for documentation? Take a look on our wiki

Main Menu

VP Merchant + VirtueMart + Stock display

Started by joerggoess, December 09, 2020, 17:05:13 PM

Previous topic - Next topic

joerggoess

Hello community,
I need your help, cause I'm not able to fix my "problem" and couldnt find a solution.

I'm running
joomla 3.9.23
vp merchant 5.5
VirtueMart 3.8.6 10373
the two web spaces are running PHP 7.4
and local I'm running an older version.

I've installed the quick_start_vp_merchant 5.5 package on three servers.
One on my local diskstation and two on two different web spaces.
The local installation is the original version with all its demo items.
One one webspace my offical site is running and a backup of it is running on a second space.

My problem: The stock isnt shown an any istallation. If I switch to protos or beez I can see that traffic light (green, orange, red) but on vp_merchant I can see nothing.
On the produktdetail site, there is a text " In Stock" and I can turn it off and on in the configuration. But no stock quantity is shown.
I have googled and read through a lot of forums and postings tried this and that, some overrides from Jumbo, but nothing will work on none of my installations.

There are no other 3rd party plugins or components isntalled, except akeeba backup and a visitor counter an OPmaps. Thats all I've added.

Can anybody help me to fix that, but I'm not a programmer or scripter or what, so please be calm cause it could take a minute or two for me to understand.
It would be nice if the stock quantity will be shown on the productdetail site, it would be great if it could be shown on the category site too, but for me its important that it will be shown anywhere.

Thank you all for your time,
Joerg.

Jörgen

Search forum. There is SQL optimization you can uncheck.

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

GJC Web Design

in the VP template I only see this

<?php $show_stock = VmConfig::get('display_stock', 1); ?>
               <?php if($show_stock && $this->product->orderable) : ?>
                  <div class="product-stock-cont col-sm-6">
                     <?php $stock = VPFrameworkVM::getStockText($this->product); ?>
                     <span class="<?php echo $stock->class ?> hasTooltip" title="<?php echo $stock->tip ?>"><?php echo $stock->text ?></span>
                  </div>
               <?php endif; ?>

so it will only show a text if in stock  -- so u need to change the code if u want stk quantity to show
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

joerggoess

#3
Thank you GJC Web Design,
I was searching the forum, but .....

Please two questentions:
What file ist it and where should I find it?   

Can you please write down the syntax I have to change? I've no glue about that .

Thank you
Joerg.

joerggoess

Search forum. There is SQL optimization you can uncheck.

Sorry but I cant find what you said. Do you mean the SQL optimization in the shop configuration (I've unselected them, but no change), or in the template?

Thanks Joerg.


joerggoess


GJC Web Design

\templates\vp_merchant\layouts\default\html\com_virtuemart\productdetails\default.php

you will need to swap out the stock section with the section from the standard  productdetails\default.php file
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

joerggoess

Quote from: GJC Web Design on December 09, 2020, 22:19:13 PM
\templates\vp_merchant\layouts\default\html\com_virtuemart\productdetails\default.php
got it, but where can I find the variable text?

Thank you
Joerg

joerggoess

#8
Quote from: GJC Web Design on December 09, 2020, 22:19:13 PM
\templates\vp_merchant\layouts\default\html\com_virtuemart\productdetails\default.php

as I said, got i for the detail view, is there any possibility to show the stock in the category view too?

I've played aound, if quantity is less than quantity to notify, the stock quantity looks like:

Only 49 in stock 49

Ideas???

thanks
Joerg

GJC Web Design

as u can see on the std VM stk is also shown on a cat view

http://demo.virtuemart.net/

so u have to use the code provided by the std VM and graft it into your commercial template....
components\com_virtuemart\sublayouts\products.php

            if ( VmConfig::get ('display_stock', 1)) { ?>
               <span class="vmicon vm2-<?php echo $product->stock->stock_level ?>" title="<?php echo $product->stock->stock_tip ?>"></span>
            <?php }
            echo shopFunctionsF::renderVmSubLayout('stockhandle',array('product'=>$product));
            ?>
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

joerggoess