Post by tamimi » Wed Jun 06, 2012 4:31 am

https://docs.google.com/open?id=0B2MYM4 ... XBuTjd2MGs
^That's essentially what I want.

I want it as an option like "select" "text" and "textarea" sort of thing, not embedded in the layout itself or a module - Because I don't need it in every product in the store.

The fields also must be editable.

Can anyone help with this? Quick advice is also very welcome indeed.

New member

Posts

Joined
Mon Jun 04, 2012 4:42 am

Post by inactiveaccount9912 » Wed Jun 06, 2012 5:27 pm

That can be done with the select, input text and textarea options allready in opencart. Insert them in admin > catalog > options and then link them to the product, on the product edit page > tab options.

Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am

Post by tamimi » Wed Jun 06, 2012 6:33 pm

florinsith wrote:That can be done with the select, input text and textarea options allready in opencart. Insert them in admin > catalog > options and then link them to the product, on the product edit page > tab options.

Yes of course :) I was referring to the way the fields are laid out in a table.

It's the table thing I can't manage.

I can edit the product.tpl to put them into a table but then this table will appear on every single product in the store! :( I want it to be something I can add/remove, same way I can add and remove the input text fields.

Hope that makes sense.

New member

Posts

Joined
Mon Jun 04, 2012 4:42 am

Post by ecoleman » Wed Jun 06, 2012 8:24 pm

This can be done by modifying the .tpl file, BUT it will only work if these are the only options that would appear on a product page.

In other words it either displays that format or it displays nothing.

If that's okay, then I can do this for you. It wouldn't take any more than an hour to do so the cost would be £25 via Paypal Invoice.

Colour Code you orders by Order Status


Active Member

Posts

Joined
Tue Dec 06, 2011 3:34 am

Post by tamimi » Wed Jun 06, 2012 10:18 pm

ecoleman wrote:This can be done by modifying the .tpl file, BUT it will only work if these are the only options that would appear on a product page.

In other words it either displays that format or it displays nothing.

If that's okay, then I can do this for you. It wouldn't take any more than an hour to do so the cost would be £25 via Paypal Invoice.
Thanks for the offer - But I can already do this myself. I need it to be an option I can add/remove.

This is because I only need the form table to appears on particular products.

T

New member

Posts

Joined
Mon Jun 04, 2012 4:42 am

Post by inactiveaccount9912 » Wed Jun 06, 2012 11:07 pm

You could just edit the css and fixate the width of the option div so that they would appear 2 per line. I dont see how that might affect the others product options. So they appear 2 per line for all , but as long as they are well aligned they will look good for all products.

Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am

Post by JAY6390 » Thu Jun 07, 2012 1:15 am

Basically you need to add an option in the admin on a per-product basis that you can test for in the template. If you would like me to do this for you, get in touch and I'll give you a quote and further details

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by ecoleman » Thu Jun 07, 2012 2:26 am

I think really you need to explain exactly how your system works.

Do you have different options for different products, or is it just certain products will have the options mentioned above (the rest of the products will have no options)

If the former, then you would need a way to indicate that you want the layout as specified which is possible but if it's the latter, then all you need to do is tweak the .tpl file. If done correctly the table will not display if the products has no options.

The more information you give, the easier it is for people to work out a solution for you. At the moment we are all stabbing in the dark a bit :)

Colour Code you orders by Order Status


Active Member

Posts

Joined
Tue Dec 06, 2011 3:34 am

Post by tamimi » Thu Jun 07, 2012 4:35 am

ecoleman wrote:I think really you need to explain exactly how your system works.

Do you have different options for different products, or is it just certain products will have the options mentioned above (the rest of the products will have no options)

If the former, then you would need a way to indicate that you want the layout as specified which is possible but if it's the latter, then all you need to do is tweak the .tpl file. If done correctly the table will not display if the products has no options.

The more information you give, the easier it is for people to work out a solution for you. At the moment we are all stabbing in the dark a bit :)
Sorry, I should've clarified further.

Basically, we sell prescription glasses.
Instead of having a million fields for prescription data, we want to put those fields into a table to make them look neat. But we still have other options we don't need to tabulate such as "Frame colour".
Yet also, we don't want the table to be embedded permanently in the layout, because we sell some products that don't require a prescription such as contact lenses solution.

I hope that makes it clearer.
Ta
T

New member

Posts

Joined
Mon Jun 04, 2012 4:42 am

Post by WebEngage » Thu Jun 07, 2012 6:52 pm

As JAY6390 pointed out, an option needs to be added at a per product level. I can quote you for the extension if you would like, but if you want to do it yourself then here's 1 way you can do it:

-Create a new field for the product table called "template" (duplicate the properties of the model field if you want)
-Create the variable (Template Override - as a text field) on the Product Form in the backend (you need to edit product_form.tpl, controller/catalog/product.php, and model/catalog/product.php - try you best to "duplicate" another variable and rename all references)
-Copy the catalog template product/product.tpl to product_alt.tpl
-In the backend, add product/product_alt.tpl to the newly added field (do this for all products that you want to display the custom template for)
-Edit the catalog/controller/product/product.php to pull the template variable. If set, have the controller reference that tpl file instead of the normal product.tpl


And that should be it. Was a rush job to type that out, so I do apologise. Pretty much you can use this on any product, and it allows you to specify a different template to render on a per product basis.

Like I said, I'm happy to quote you for the above if you are interested - send me a PM - but you're looking at $60-80USD, happy to split the cost if someone else is interested, and would develop as an extension (would sell for like $10USD) if there is enough interest.

PM if you are interested.

Regards,
WebEngage

Newbie

Posts

Joined
Mon Jun 04, 2012 9:18 pm

Post by tamimi » Thu Jun 07, 2012 7:27 pm

WebEngage wrote:As JAY6390 pointed out, an option needs to be added at a per product level. I can quote you for the extension if you would like, but if you want to do it yourself then here's 1 way you can do it:

-Create a new field for the product table called "template" (duplicate the properties of the model field if you want)
-Create the variable (Template Override - as a text field) on the Product Form in the backend (you need to edit product_form.tpl, controller/catalog/product.php, and model/catalog/product.php - try you best to "duplicate" another variable and rename all references)
-Copy the catalog template product/product.tpl to product_alt.tpl
-In the backend, add product/product_alt.tpl to the newly added field (do this for all products that you want to display the custom template for)
-Edit the catalog/controller/product/product.php to pull the template variable. If set, have the controller reference that tpl file instead of the normal product.tpl


And that should be it. Was a rush job to type that out, so I do apologise. Pretty much you can use this on any product, and it allows you to specify a different template to render on a per product basis.

Like I said, I'm happy to quote you for the above if you are interested - send me a PM - but you're looking at $60-80USD, happy to split the cost if someone else is interested, and would develop as an extension (would sell for like $10USD) if there is enough interest.

PM if you are interested.

Regards,
WebEngage

Thank you for the valuable info. This seems like a reasonable solution. I'll have a crack at it myself first and if I get nowhere I'll let you know. I'd be happy to pay you (Or any interested member) to do it at that point.

Once again, thanks very much. Better start typing. :ponder:

New member

Posts

Joined
Mon Jun 04, 2012 4:42 am

Post by kfc0209 » Sun Aug 19, 2012 10:46 pm

Hi, I am looking for something similar. I am working on a contact lens store, I got one set of 3 product options set up to allow customers to select "lens power", and "cylinder" and "axis" for astigmatism (all 3 are select fields), and a Quantity to order. There is no problem setting these up as it requires standard Opencart features. What I need is to duplicate the same set of options and the order quantity on the same page so that customer can place order for the left and right eyes, and then click Add-to-Cart once to place the order. Wonder how this can be done? I looked at the above discussion and it seems to be different from what I need; Thanks. :)

Newbie

Posts

Joined
Wed Jul 25, 2012 11:28 pm
Who is online

Users browsing this forum: paulfeakins and 8 guests