Jump to content

order = image but is unique so how to uoload it for FO to view


Recommended Posts

This is my plan of attack:

In Store Settings, Features tab, Misc section, "Force Order Completed Emails" to be unckecked.
In Filemanager-Images, upload a "Under Construction" image.
Give that image a new name -- the name of the customer, perhaps.
In Filemanager-Downloads, upload that same image (with the new name).
Add a new product for the service you are performing (bespoke image).
.Fill in General, Description, Pricing, and Categories tabs.
.Save & Reload.
.On Images tab, select as Master Image the Under Construction image.
.On the Digital tab, select the Under Construction image.
.Save & Reload.
.Verify all settings remained.
Clear CubeCart's cache.
View the product on the storefront.

When purchasing this product, CubeCart will create a downloadable link for the customer.
Currently, when the customer checks their Downloadable purchases, that download link will be the Under Construction image.

Now, create the bespoke image.
.Name it the same as the new name (customer's name?) specified earlier.
.Upload it using Filemanager-Downloads (to the same location if putting it in a sub-folder).
.This bespoke image will replace the Under Construction downloadable image.

Set the order status to Complete.

Now, when the customer checks their Downloadable purchases, the image that will be downloaded will be the bespoke image.

We need to add the thumbnail of the downloadable image to the email "Order Complete".

TODO -- Notes:

In assignOrderDetails() hook, add the image link to the medium variant of the product's downloadable image
. $GLOBALS['smarty']->assign('DATA', $this->_email_details['order_summary']); gets the cart_order_id
. $GLOBALS['smarty']->assign('PRODUCTS', $this->_email_details['products']); gets the order_inventory_id and product_id
. product_id gets getFileInfo() data
. if mimetype:image, create and get medium image
. Catalogue->imagePath() gets URL of medium image
. add URL to PRODUCTS dataset

Add link of product['medium_image'] in email contents.



Link to comment
Share on other sites

Awesome , understood. Could the products created with this bespoke image be "offline" so they don't show up for everybody's without affecting the customer being able to view them?. It seems to me you are extremely knowledgeable with the CC architecture so let me ask you this.

Is there a way, me, as the administrator, once someone places an order, to be able to access the order through BO which I can normally do under "customers -> order". And once there, be able to upload a file (in my case the custom unique image) for the customer to view? Some tweak on the code, maybe an override?

I love your approach and it gave me hope, like a light at the end of the tunnel, but if I can't make it work with the product being offline it won't work. I cannot expose the images for everybody to view, this will also create tons of products but I believe that wouldn't be an issue as CC can handle anything!

For a better understanding, the images are lottery tickets. I only have 7 products (games) customer can play (buy). They tell us which numbers and game they want to play, we have physical agents to purchase the lottery at its host country. We buy the ticket and would like to scan it on our side and "attach" it to the specific order (game) the customer played (bought). That's why, on your approach, unless I can have those new product/images offline, it won't work. Lottery tickets are super personal and cannot be shared.

That's why I was thinking maybe granting an override to admin so it can enter an order details and add the image (ticket) to the order. Customers can then access the order through FO and view it/download it/print it/etc.

Again, thanks in advance, I know everybody is busy watching the world cup haha. Cheers!


Edited by AeroLogistica
Link to comment
Share on other sites

Working on it, albeit as fast as I can.


You might also find this plugin of interest:


Unfortunately, that plugin description says it is written for CC6. You could try to contact the publisher to see if a version could be written that will work on CC5.

Link to comment
Share on other sites

Ok, so a version of the plugin runs under PHP 5.6 (which requires the compatible version of ionCube! be installed for PHP to use).

I was commenting on whether or not the plugin will work with CubeCart 5. Be sure to ask.


Edited by bsmither
Link to comment
Share on other sites

Please, if you wish, after some more testing, leave a review of the Attached Documents plugin at:


Be sure to mention the version of CubeCart you are using (and maybe why that version), and the version of PHP it is running on (with ionCube).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...