Jump to content

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

V2.2.4 Product Tracking Bug? - Should Be Easy Fix? Rate Topic   - - - - -

 

Posted 29 May 2015 - 01:06 PM #1

After many years of running our online store on v2.2.x were are about to add the first products that we do not actually stock for immediate sale. We are doing custom T-shirts that will be made to order. This is in addition to around 2,000 items that we already sell and use inventory tracking for.

Here's a link to one of our new items: http://www.abitofhom...lt-t-shirt.html

So far, everything is mostly OK except one cosmetic issue that I have not been able to fix. You will notice that under the price for this shirt you see the label "in stock". I have the inventory setting for this product set to "do not track". My logic would tell me that this stock label should not display at all if I am not tracking inventory. I can't stop this label from appearing.

I am using the "old style long options" template and I have been focusing my attention around the lines

{assign var="product_amount" value="product_amount_`$obj_id`"}
{$smarty.capture.$product_amount}

This is where I figure the in (or out) of stock labels are generated. My thinking was an {if} statement that evaluated the inventory setting and if it was set to "do not track" then the above lines should be skipped over and perhaps a black space inserted in its place.

I have not modified any code for quite some time since the store has been chugging along quite nicely for years so, I am a little rusty. I've been working on this for a couple of weeks and am stumped.

Any kind soul out there care to point me in the right direction? maybe a hint?

Cheers!
Henry
CS-Cart v2.2.4 PRO

The road to success is always under construction!

 
  • dataspotgr
  • Member
  • Authorized Reseller
  • Join Date: 04-Sep 13
  • 42 posts

Posted 14 December 2015 - 09:35 AM #2

Hello there,

 

I am a little confused about what you want to do actually.. You do not want to have the "add to cart" function, because the product does not exist any more?, or you just want to erase the "in stock" label-text?

 

if you want to completely erase it (from all the products of your store) you can add this code to your css style file:

 

span[id^=in_stock_info_] {
        display: none;
    }

 

 

    Otherwise, if you are "Enable inventory tracking" through the Settings -> General -> Catalog(section), there is one more option inside this section "Show out of stock products".

    If you enable this checkbox, the products with 0 stock, will show up, but users can not buy these ones...But there is a link says "Add to wishlist" instead of buying...

    If you uncheck this value you will will not see these products at all.

 

 

Hopes that help!



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

Posted 14 December 2015 - 03:17 PM #3

Try this code:

{if $product.tracking != "D"}
{assign var="product_amount" value="product_amount_`$obj_id`"}
{$smarty.capture.$product_amount}
{/if}

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    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • galtinbaeva
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 06-Dec 13
  • 3366 posts

Posted 15 December 2015 - 06:40 AM #4

in 4.3.x you can use {if $product.tracking != "ProductTracking::DO_NOT_TRACK"|enum}


Simtech Development | sales@simtechdev.com | www.simtechdev.com
CERTIFIED CS-CART PARTNER | LICENSES | DEVELOPMENT | ADD-ONS | DESIGN | UPGRADE

Google Analytics Enhanced Ecommerce - get advanced ecommerce analytics


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

Posted 15 December 2015 - 07:21 AM #5

in 4.3.x you can use {if $product.tracking != "ProductTracking::DO_NOT_TRACK"|enum}

 

The question was about 2.x version. This code will not work there


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    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • galtinbaeva
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 06-Dec 13
  • 3366 posts

Posted 15 December 2015 - 07:34 AM #6

Oh, missed the version.. Right!


Simtech Development | sales@simtechdev.com | www.simtechdev.com
CERTIFIED CS-CART PARTNER | LICENSES | DEVELOPMENT | ADD-ONS | DESIGN | UPGRADE

Google Analytics Enhanced Ecommerce - get advanced ecommerce analytics