Alter attributes on product variant page

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 年 前
I'm trying to do tweek the attributes. in a product variant page, but to no evail, I would figure the place would be in the file /modules/ProductAttributes.ascx.cs, but nothing changes

for example i'd like to put a line break between each attribute, but what ever i do in that code file nothing is happening, as a matter of fact even if i remove the entire file every thing is still running with no changes.
13 年 前
I am stuck in the same issue,

i had posted a similar thread

https://www.nopcommerce.com/boards/t/9326/display-products-attributes-inline.aspx

it is urgent for me if you find any solution just pm me.

thanks a lot.
13 年 前
I could not even remove that star
13 年 前
This is a mistery, I'm banging my had over this for days, I just can't figure for the life of it, where I'd modify Product Attributes for Variant Products, modifying /Modules/ProductAttributes.ascx.cs DOES NOTHING, I can replace the entire code with the words "HAVE A NICE DAY" and nothing happens.
13 年 前
i am working with nocommerce quiet good, I only open the webstore and develop on it but never touched the CLASSES, may be it is hiding there.
13 年 前
I want to remove that * star definitely, but i could not


I could make the attributes inline using css


.product-variant-line .attributes div
{
   float:left; padding-right:5px; line-height:20px; height:20px;
}
.product-variant-line .attributes div span
{
   float:left; padding-right:5px;
}
13 年 前
Eureka

Oops so silly , I wish someone had told this.

Do the necessary modifications in the ProductAttributes.ascx.cs file (i removed the star btw)

And recompile the whole nopcommerce project. Run the store viola....

you can use css to make it inline.


Hope this helps some one.
13 年 前
Thanks Buddy!

I had a hunch that perhaps that the code ends up compiled into a dll.

One more note: the only file that needs to be replaced on the web-server is bin/NopCommerceStore.dll

Another side note; I don't see why this line would be hard coded in ProductAttributes.ascx.cs

attributeTitle.Style.Add("font-weight", "bold");

I took it out, styling should be exclusively in the css, and there is a section in the css for styling the attributes


Anyway, Thanks again!
12 年 前
Did you figure out how to add line breaks between the attributes? I've been trying to do that myself and can't get it to work.

Thanks!
12 年 前
You can add linebreaks between the attributes within the class <ProductAttributes.ascx.cs>

There is an for 'each loop' where all Attributes get placed on the page. If you like an additional linebreak between one attribute and the next, just insert an linebreak at the start of the 'attributeTitel'.

I also detected if its the first attribute to not have a linebreak at the top. I managed that with a boolean, named "firstAttribute" witch I set to false after the first loop done. Then insert on every following loop an linebreak like so:

attributeTitel.Text = "<br/> + attributeTitel.Text;

Just an Idea but it works

btw. you can change many other things in there as well and dont forget to rebuild after you made some changes ;)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.