X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   Adding Images to the Invoice (https://forum.x-cart.com/showthread.php?t=70618)

minfinger 04-04-2015 04:25 AM

Re: Adding Images to the Invoice
 
[quote=tony_sologubov]1) Making images clickable is basically to wrap them into <a></a> tags. I believe, you already know that, so I am not sure what piece of advice I can give you here aside from just adding <a></a> tags.[/quote

Tony,

I know how to use <a> lol I just have no idea with the proper code would be to do that.

tony_sologubov 04-07-2015 05:59 AM

Re: Adding Images to the Invoice
 
Quote:

Originally Posted by minfinger
Tony,

I know how to use <a> lol I just have no idea with the proper code would be to do that.


Makes sense now :- )

You can specify it as
Code:

?target=product&product_id=#PRODUCT ID#

of course #PRODUCT ID# part will be taken from the {item} object.

The code you shown previously does not make a lot of sense to me as I am not quite following what you are trying to achieve by it.

minfinger 04-11-2015 02:05 PM

Re: Adding Images to the Invoice
 
I'm trying to get the image load on the General Info Tab on when you look at the order information. You originally said:
Quote:

In order to add images to Order Items section in General info tab, you need to decorate the \XLite\View\ItemsList\Model\OrderItem viewer class and add new image field to the defineColumns() method similar to how it is done here:
http://kb.x-cart.com/display/XDD/Ite...+in+admin+area

And that's what I was trying to do. I was asking your opinion before I tried the code.

tony_sologubov 04-15-2015 04:47 AM

Re: Adding Images to the Invoice
 
Quote:

Originally Posted by minfinger
I'm trying to get the image load on the General Info Tab on when you look at the order information. You originally said:


And that's what I was trying to do. I was asking your opinion before I tried the code.


Thanks for the explanation, Michael. Now your idea is clear to me.

Your code should look as follows:
PHP Code:

namespace XLite\Module\FasterThanYours\ImagesOnGeneralInfoTab\View;

class 
OrderItem extends \XLite\View\ItemsList\Model\OrderItem implements \XLite\Base\IDecorator
{
    protected function 
defineColumns()
    {
        
$return parent::defineColumns();

        
$return += array(
            
'image' => array(
                static::
COLUMN_NAME     => 'Image',
                static::
COLUMN_ORDERBY  => 100,
            ),
        );
    }



Because, you only need to add one more field to an array returned by defineColumns() method, not to overwrite this array completely.

minfinger 08-01-2015 07:37 PM

Re: Adding Images to the Invoice
 
Tony,

This may have broken with the latest release. I have duplicate logos on my invoices and the Image column is there, but the image is not. The Image is showing up on the "Thank your for your order" screen after checkout.

I am working on something unique with Olesya that modifies the Invoice Email. You may want to chat with her.

Packed Mod:
https://www.dropbox.com/s/6pih1imkjzinhog/FasterThanYours-ImagesOnInvoice-v5_2_0.tar?dl=0

Image of the Invoice in Email
http://i21.photobucket.com/albums/b298/fasterthanyours/Images%20On%20Invoice%2003%20-%20Double%20Logos%20a...20pictures.jpg

qualiteam 08-03-2015 11:43 PM

Re: Adding Images to the Invoice
 
Quote:

Originally Posted by minfinger
This may have broken with the latest release.


It works on our local installation. Some other module (perhaps, a custom one) seems to cause the problem.

minfinger 08-04-2015 01:54 AM

Re: Adding Images to the Invoice
 
I think the core installation is corrupt. I disabled all mods and it's still producing the problem. How can i replace just the files that this mod affects or even all of the files that generate that emails?

razortw 08-05-2015 12:02 AM

Re: Adding Images to the Invoice
 
Quote:

Originally Posted by minfinger
I think the core installation is corrupt. I disabled all mods and it's still producing the problem. How can i replace just the files that this mod affects or even all of the files that generate that emails?

That's kind of a known issue with the latest version of X-Cart. However, this is not a bug.
The invoice logo duplicates because you have one piece of code that add a logo in the .tpl template of the invoice (templates can be found in /skins/default/en/order/invoice) and one in the header of the invoice.
Go to the "Store setup" > "Email notifications" > "Headers and signatures" and remove everything from the "Header" section.
That is how you eliminate one of the logos.
About the "Image" column on the invoice, most likely one of your templates is customized, and it mistakenly adds this.
This should be looked into thoroughly on your server.

minfinger 11-05-2015 05:21 AM

Re: Adding Images to the Invoice
 
Igor,

Actually I had this problem in 5.2.6. I haven't checked in 5.2.9 yet. In the old version I was able to remove the logo, but the remainder of the text kept reproducing itself.

Tony,

Since upgrading to 5.2.9, the Images on Invoice Mod has stopped working.

razortw 11-05-2015 05:40 AM

Re: Adding Images to the Invoice
 
Quote:

Originally Posted by minfinger
Igor,

Actually I had this problem in 5.2.6. I haven't checked in 5.2.9 yet. In the old version I was able to remove the logo, but the remainder of the text kept reproducing itself.

Tony,

Since upgrading to 5.2.9, the Images on Invoice Mod has stopped working.

Sorry, I won't be able to tell anything for sure without investigating this in your X-Cart installation.
Please submit a support ticket at https://secure.x-cart.com


All times are GMT -8. The time now is 08:22 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.