Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Implementing pixlr api on Osc 2.2


RichSM

Recommended Posts

Hi Guys,


I am implementing pixlr api editor (photo editing) in my website for visitors.
At the moment, I could manually pass one product image name (with full path) from www.mysite.com/catalog/editor/index.php page to pixlr api editor like:
<a href="javascript:pixlr.overlay.show({image:'http://www.mysite.com/catalog/images/decanter1.jpg'title:'decanter1'});">Design your image</a>

What I would like to do is to dynamically grab the product_id from the current request url (in visitor's browser), then  use sql query to get the image name for that product_id form the database, then pass on the product image name to pixlr api editor like stated above.

How can I set this up inside catalog/editor/index.php? File is attached. Thanks.

 

Regards

RichSM

index.php

Link to comment
Share on other sites

Is this part of osCommerce, or some other non-store part of your site? I'm curious as to what visitors/customers would be doing editing your files -- are you selling these edited pictures as downloadables, or printing them on tee shirts, etc.? If the latter, it might be easier to simply upload customer-supplied images. After all, every PC comes with basic picture-editing software.

 

I can't answer your question itself, but I will observe that osC 2.2 is positively ancient. You are going to be running faster and faster just to keep up with (unofficial) patches for new PHP versions and for security exposures. Keep in mind that 2.2 is basically unsupported now. You should be seriously considering going to 2.3.4 (the latest supported version) before engaging in any massive hacking to add new functionality.

Link to comment
Share on other sites

Is this part of osCommerce, or some other non-store part of your site? I'm curious as to what visitors/customers would be doing editing your files -- are you selling these edited pictures as downloadables, or printing them on tee shirts, etc.? If the latter, it might be easier to simply upload customer-supplied images. After all, every PC comes with basic picture-editing software.

 

I can't answer your question itself, but I will observe that osC 2.2 is positively ancient. You are going to be running faster and faster just to keep up with (unofficial) patches for new PHP versions and for security exposures. Keep in mind that 2.2 is basically unsupported now. You should be seriously considering going to 2.3.4 (the latest supported version) before engaging in any massive hacking to add new functionality.

Mr Phil, it is not a part of oscommerce. It is an api (like fotoflexer, Ribbet, etc) that gives you a kind of a mini version of photoshop and people can edit your product image and their images online. You are right that PC comes with basic picture-editing software, so I guess its a matter of choice, customer friendliness, convinience etc. The site is heavily modified, it would be almost impossible to upgrade to 2.3 now.

 

You said "it might be easier to simply upload customer-supplied images" What is customer-supplied images? If you mean allow customer to upolad their own images, the site has that function already.

 

What I am looking for is the right php code to grab the right product_image name and pass it on to pixlr. Thanks.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...