qor-example/models/products/product.go bug
scoobyroo opened this issue · comments
if there are no color variations for a product this code will not redirect to correct Url
func (product Product) DefaultPath() string {
// the current line
defaultPath := "/"
// should be replaced with something like this
defaultPath := fmt.Sprintf("/products/%s", product.Code)