Close

Profile: OTH

Avatar

User posts

4 years ago

Valentin wrote:
Hi,

I think it would be a good idea to add a product feature so as to be able to choose a display color for product stock status.

As in if a products stock status would be;

In Stock - You could choose for it to appear with green letters.

Out of Stock - You could choose for it to appear with red letters.

Best regards,
OTH

Hello OTH,

there are many options for the Availability of the products, but if you want to just check if a product is Out of stock and have different styling for the label you can use the following approach.

In the _Availability.cshtml file in your Product folder add the bolded lines of code:


@model ProductDetailsModel

@using Nop.Services.Localization

@inject ILocalizationService localizationService


@if (!string.IsNullOrWhiteSpace(Model.StockAvailability) || Model.DisplayBackInStockSubscription)
{
    <div class="availability">
        @if (!string.IsNullOrWhiteSpace(Model.StockAvailability))
        {

            bool outOfStock = string.Equals(localizationService.GetResource("products.availability.outofstock"), Model.StockAvailability, StringComparison.InvariantCulture);
            string stockClass = "is-in-stock";

            if (outOfStock)
            {
                stockClass = "is-out-of-stock";
            }


            <div class="stocking @stockClass">
                <span class="label">@T("Products.Availability"):</span>
                <span class="value" id="stock-availability-value[email protected]">@Model.StockAvailability</span>
            </div>
        }
        @await Html.PartialAsync("_BackInStockSubscription", Model)
    </div>
}




This will add a class of is-in-stock anytime the product is not Out of stock, and a class of is-out-of-stock if the stock quantity is 0.
You can then you these classes to add some custom styling to Availability element like red color if is-out-of-stock and green if is-in-stock.

Hope this was helpful.



Would I add this just to the chtml file itself or would I have to put this in the source code itself? And would this help with different coloring/labeling on to front side of the page?

4 years ago

Hi,

I think it would be a good idea to add a product feature so as to be able to choose a display color for product stock status.

As in if a products stock status would be;

In Stock - You could choose for it to appear with green letters.

Out of Stock - You could choose for it to appear with red letters.

Best regards,
OTH

6 years ago

Hi I was wondering if it's possible to add a "Custom List" under Category Product Collections?

This is possible for Custom Product Collections, but it would be very convenient if it would also work for Category Product Collections so admins can choose which product to display on the home page under different categories.

Your input would be very much appreciated.

6 years ago

One suggestion.
To be able to put a logo on both left and right side of the footer on the page (Same line a payment-sprite)
This would come in handy if you wanted to add a logo from "Symantec" for example on the right side to show the customer the website is secure.
And on the left side to put a logo from someone that has given the company a certificate to do some sort of business (Like dealing with animals or food).

6 years ago

Hi,

I wanted to know if someone can tell me how to remove the "search" tab from the menu bar?

There is already a search bar below it and I don't really want to have a tab/button also.
Any help is appreciated.

Regards,
Odinn Thor

6 years ago

hristo wrote:
The image sprite file is "payment-sprite.png", you can find it in the "img" directory in your theme. If you edit this file you have to edit also the corresponding css code according to your changes. The code is located in the main css file ("styles.css")


Hi,
I found out where to do this, thank you.

I was wondering if you could tell what code to put in the styles css file if I would want to put logos like "payment-sprite" but on the right or left side of the footer?

Regards,
Odinn Thor

6 years ago

Hi,

I was wondering if you could tell me if and where I can change the size of the "payment-stripe" at the footer of the page?

The reason why I need this is because the company offers 7 different card payment options and it would be better to be able to have just a little bit bigger photo instead of making the logos even smaller than they are already.

Please advice.

Regards,
Odinn Thor

6 years ago

Hi,

I was wondering if there are some calculating bugs on the theme regarding taxes?

I put the default tax as 24% (Which we use in Iceland) but it seems to be calculating the tax incorrectly...

If I buy a product in 200.000 ISK (Icelandic Krona) then the tax should be 48.000 ISK.
But it will show instead that the tax is: 38.710 ISK.

Please advice.

Regards,
Odinn Thor

Hi,

I was wondering if there is a possibility to have two different logos for desktop version and mobile/tablet version?

The thing is that the logo that we use is in the color: #F41921

But the thing is that the website itself is also in those colors, the navigation bar etc.

It looks and works perfectly well with the desktop version, but you would go to the mobile version then the logo basically disappears.

So I was wondering if it's possible to have one logo for the desktop version in the color mentioned above and the mobile/tablet logo in white for instance.

Please advice.

Regards,
Odinn Thor