View Single Post
  #2  
Old 02-08-2016, 03:47 PM
river's Avatar
river river is offline
Ecwid Team
 
Join Date: Feb 2015
Posts: 452
Default

Quote:
Originally Posted by matt adika View Post
Hey everyone.

Does anyone know if there is a plugin or app that allows a single product to group multiple products together in a group?

This is something that should be implemented because I sell alot of "Package" deals with alot of add ons etc, currently I am using the "options" tab to have my customers add "options" but they are really not only selecting options but adding additional products to the order...

when I use the options feature.. sometimes I have up to 10 options and when it prints on our invoice its all packed together without any spacing or line breaks... is there anyway to change this so its easier to see?

or a way to make grouped products like woo commerce?

to see an example of how i am currently doing my packages visit:

http://floridagunclassifieds.com/onl...egory=12742003

here is what it looks like on an invoice:

any help would be appreciated! I am building a new website and my web developer is telling me the only way to do the "packages" is to use woo commerce and I don't want to switch! i love Ecwid.

>>>

No one has any input on this topic? Im sure I am not the only one that sells "grouped products" in one sale. Admin? Anyone?
Hello,

Ecwid Customer Care team here.

I'm terribly sorry for the delayed response.

First of all let's take a look at the issue with the way the options listed in the Invoices.

Basically all the options for products in the invoices are represented with a variable ${orderItem.formattedOptions} - the options are dragged to invoices from backend as a single string, so it's impossible to divide them into separate lines by means of CSS or HTML.

However I can suggest a workaround with a JavaScript added straight to the invoice template.

As you see all the options in the list a separated with a comma, so we have at least one way to separate the options to individual lines. For that matter we can replace the commas with <br> tags and it will do the trick.

Here's what we get as a result in our invoices:



However you should also note that all the commas in the list of options will be replaced with a line break, so it's a good idea not to use commas in the names of the options.

Alright, let's make this happen now:

Access your Ecwid Control Panel and proceed to Settings -> Invoice.

Once you are there, click the "Edit invoice template" button:



You'' see the html code of the invoice template and now you need to find the block with options. Scroll the page down to the line 388 (for the default template) and you'll see the block.

What you need is the following tag:

Code:
<p>${orderItem.formattedOptions}</p>
You need to add a CSS class to it so that we were able to work with it by means of JQuery and the script like that:

Code:
<p class="dividedoptions">${orderItem.formattedOptions}</p>
Once you are done with that we also need to add JQuery to the template for the script to be able to work with it. You can add JQuery to the top of the "options" block, for example with this tag:

Code:
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
Now, let's add the script right after the <p> tag we previously edited:

Code:
<script>
$('.dividedoptions').each(function() {
var text = $(this).text();
text = text.replace(/ *, */g, '<br>');
$(this).html(text);
});
</script>
Eventually this block of the invoice should look as follows:



Once all the changes are done and everything looks just as in the screenshot above, Save changes.

In result all commas in the options will be separated by breakers, so they'll go line-by-line instead of the plain comma-separated text.

As for the native "Bundled Products" feature, well, now we have something similar which is called Related Products . Here's the article about this feature, perhaps you'll find it helpful: Related Products

However it's just as well always possible to develop another feature for your store only or just as well create an application for all the Ecwid users by means of our API or, particularly JavaScript API.

If you are interested in creating something that does not exist in Ecwid now, please write back with a complete description of how you see this feature working and we'll be glad to help you achieve that!

Looking forward to your reply with results and feedback on that matter!
__________________
Roman I.
Ecwid Customer Care Team

More tips and hints on Ecwid use in our Help Center

⬇ Please click Thanks if my reply helped you.

Last edited by river; 04-05-2016 at 11:40 AM.