I have created a product with some variants, of which these are loaded into a category listing: http://www.wyldebydesign-dev2.co.uk/category/6-cleaner-sanitiser.aspx
The problem i'm having is, i'm unable to distinguish between variants when loading them into the product template. I don't want to show more than one variant at a time: here is an example: http://www.wyldebydesign-dev2.co.uk/products/1-bactericidal-cleaner-sanitiser.aspx
I have a problem where the client needs a brilliant CMS such as nopCommerce but is unwilling to stick to the ecommercce norm so that's why the structure may seem incorrect but the problem still remains that I'm unable to get a Product Variant url from the SEO Helper... only a productURL.
Is there a way to load variants into a template, and not the product as a whole.... I hope i'm making sense?
I also have another problem: When I create a new template controls won't post-back from it. I used the below steps to add a new template.
- Add a new .ascx into the Templates/Products (or categories) folder. - Inherit from the BaseNopUserControl - Go to the backend > CMS > Template > Products/Categories > Add new - Point to the new .ascx - Go to Categories/Product maintennance > select the new template.
It all works good in terms of loading the page but when I put, say an add to basket button, on the controls - their events do not fire.
Any help with the two problems is much appreciated.
I have created a product with some variants, of which these are loaded into a category listing: http://www.wyldebydesign-dev2.co.uk/category/6-cleaner-sanitiser.aspx
The problem i'm having is, i'm unable to distinguish between variants when loading them into the product template. I don't want to show more than one variant at a time: here is an example: http://www.wyldebydesign-dev2.co.uk/products/1-bactericidal-cleaner-sanitiser.aspx
I have a problem where the client needs a brilliant CMS such as nopCommerce but is unwilling to stick to the ecommercce norm so that's why the structure may seem incorrect but the problem still remains that I'm unable to get a Product Variant url from the SEO Helper... only a productURL.
Is there a way to load variants into a template, and not the product as a whole.... I hope i'm making sense?
I also have another problem: When I create a new template controls won't post-back from it. I used the below steps to add a new template.
- Add a new .ascx into the Templates/Products (or categories) folder. - Inherit from the BaseNopUserControl - Go to the backend > CMS > Template > Products/Categories > Add new - Point to the new .ascx - Go to Categories/Product maintennance > select the new template.
It all works good in terms of loading the page but when I put, say an add to basket button, on the controls - their events do not fire.
Any help with the two problems is much appreciated.
Many thanks
First of all... awesome looking site- good job!
What do you need a product variant url for? As far as I know product variants don't have their own pages (urls), all of a product's variants appear on the product's page. If you need separate pages for them, why not make each variant a separate product?
As far as the postback problem, I've dealt with that before but can't remember what was happening or how I fixed it. If you can send me the .ascx file (all files associated with it) I can insert it into the code and try to see why it doesn't work....
For anyone else who may be having post back issues... I looked into BoogleC's code and he was trying to use Image Buttons in his custom user control. For some reason you can't use image buttons in Nopcommerce - I believe it has something to do with the URL Rewriting that is going on. The urls that are used for image buttons screw up post back somehow because of the URL rewriting, so you should find an alternative to image buttons if you make a custom user control.
I would like to add to Barry's very helpful resolution for me (which was my problem).
Any ASP.NET control that renders a Javascript:__doPostback etc, seems to cause problems when posting back within nopcommerce. I'm not sure why but i'd look to Barry's suggestion at the URL rewriting engine.
If you're experiencing this problem then you have to fnid other ways of implementing your controls (of which they are usually many!).
I quick fix for using images, would be to style the normal <input type="submit" /> elements that are in the OOB list to have the image is its background-image, via css.