Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Displaying 'in Stock' When Set To 'do Not Track' Rate Topic   - - - - -

 
  • amdowney
  • Senior Member
  • Members
  • Join Date: 22-Oct 14
  • 269 posts

Posted 08 January 2020 - 05:28 PM #1

Hi - have checked all settings but just can't see how to enable this - my site has no stock status for 'do not track items'. The CS Cart demo store however does display 'in stock' - what am I missing?

 

Thanks


Stores: CCTV Kits & www.jmtb.co.uk

 
  • soft-solid
  • Junior Member
  • Authorized Reseller
  • Join Date: 19-Apr 10
  • 997 posts

Posted 08 January 2020 - 11:07 PM #2

Hello

 

Settings->General->Enable inventory tracking

 

Best regards

Robert


Team of SoftSolid
cs-cart.pl

 
  • amdowney
  • Senior Member
  • Members
  • Join Date: 22-Oct 14
  • 269 posts

Posted 08 January 2020 - 11:38 PM #3

Already is as other items show a stock number


Stores: CCTV Kits & www.jmtb.co.uk

 
  • soft-solid
  • Junior Member
  • Authorized Reseller
  • Join Date: 19-Apr 10
  • 997 posts

Posted 09 January 2020 - 06:56 PM #4

Hello

 

Problem solved or not?

 

Best regards

Robert


Team of SoftSolid
cs-cart.pl

 
  • amdowney
  • Senior Member
  • Members
  • Join Date: 22-Oct 14
  • 269 posts

Posted 09 January 2020 - 08:23 PM #5

Confusing but appears when we deselect 'Show number of available products:’ it then shows 'in stock' for do not track items... But low qty items now only show 'in stock' you can't have both?


Stores: CCTV Kits & www.jmtb.co.uk

 
  • soft-solid
  • Junior Member
  • Authorized Reseller
  • Join Date: 19-Apr 10
  • 997 posts

Posted 09 January 2020 - 08:42 PM #6

Hello

 

Did you disable inventory tracking as mentioned above ?

 

Best regards

Robert


Team of SoftSolid
cs-cart.pl

 
  • amdowney
  • Senior Member
  • Members
  • Join Date: 22-Oct 14
  • 269 posts

Posted 10 January 2020 - 09:05 AM #7

No disabling that removes all stock status notifications.

 

But keeping this enabled and disabling 'Show number of available products:’ is also putting some do not track items to 'backorder' if the inventory level is 0. Frustrating....


Stores: CCTV Kits & www.jmtb.co.uk

 
  • amdowney
  • Senior Member
  • Members
  • Join Date: 22-Oct 14
  • 269 posts

Posted 10 January 2020 - 10:29 AM #8

What code/file outputs this?

 

Surely it's an easy alteration to have 'in stock' showing all the time for do not track items while others display an exact qty...


Stores: CCTV Kits & www.jmtb.co.uk

 
  • amdowney
  • Senior Member
  • Members
  • Join Date: 22-Oct 14
  • 269 posts

Posted 10 January 2020 - 12:58 PM #9

OK it took a bit of mental energy but I finally discovered it you edit the theme file /design/themes/responsive/templates/common/product_data.tpl

 

between line 439 and 440 (just before):

                {/if}
            {else}
                {if (
                        $product_amount > 0

INSERT:

                {else}
                            <div class="ty-control-group product-list-field">
                                
                                    <label class="ty-control-group__label">{__("availability")}:</label>
                                    <span class="ty-qty-in-stock ty-control-group__item">{__("in_stock")}</span>
                                    
                                
                            </div>

I now have a site that shows an 'In stock' label for items set to 'do not track' (inventory left as 0) while 'inventory tracking' and 'Show number of available products:’  are both enabled in settings - rather than no label at all..


Stores: CCTV Kits & www.jmtb.co.uk

 
  • soft-solid
  • Junior Member
  • Authorized Reseller
  • Join Date: 19-Apr 10
  • 997 posts

Posted 10 January 2020 - 01:37 PM #10

Hello

 

There is tpl hook so use it instead of changing core files.

 

Best regards

Robert


Team of SoftSolid
cs-cart.pl

 
  • amdowney
  • Senior Member
  • Members
  • Join Date: 22-Oct 14
  • 269 posts

Posted 11 January 2020 - 12:02 PM #11

Hello

 

There is tpl hook so use it instead of changing core files.

 

Best regards

Robert

Thanks - OK this is something I need to get my head around. I can see there is the {hook name="products:product_amount"} hook, so I need to create an addon - will my addon then replace all of the code within this hook? Otherwise confused how to edit part of the existing code...


Stores: CCTV Kits & www.jmtb.co.uk

 
  • johnbol1
  • Never Re
  • Members
  • Join Date: 23-Feb 10
  • 4703 posts

Posted 11 January 2020 - 02:58 PM #12

Fair play to you for sussing it out and adding a solution, Im sure it will be handy for many


Custom printed hi visibility clothing sale the UK's online hivis safety shop
v4.5.2


 
  • soft-solid
  • Junior Member
  • Authorized Reseller
  • Join Date: 19-Apr 10
  • 997 posts

Posted 11 January 2020 - 03:07 PM #13

Hello

 

You can use the my_changes plugin which is available in standard.

 

Best regards

Robert


Team of SoftSolid
cs-cart.pl

 
  • johnbol1
  • Never Re
  • Members
  • Join Date: 23-Feb 10
  • 4703 posts

Posted 11 January 2020 - 04:06 PM #14

may  help

https://docs.cs-cart...king/index.html

 

https://docs.cs-cart...s/advanced.html


Custom printed hi visibility clothing sale the UK's online hivis safety shop
v4.5.2


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19982 posts

Posted 13 January 2020 - 05:58 AM #15

Thanks - OK this is something I need to get my head around. I can see there is the {hook name="products:product_amount"} hook, so I need to create an addon - will my addon then replace all of the code within this hook? Otherwise confused how to edit part of the existing code...

 

To override it, use the following hook

 

design/themes/THEME/templates/addons/my_changes/hooks/products/product_amount.override.tpl

 

Do not forget to clear cache


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)