Post by reececropley » Wed Feb 12, 2014 12:13 am

Hello,

I am building a store that will allow customers to buy a tyre and book it in for fitting.

Currently the owner of the store is on the road in their van a lot so when an email comes in they need to know all the information through the email. (saves them having to log in with a mobile phone)

I have managed to change the installation so that the email the customer receives is also sent to the admin. This way they know what tyre they have to fit.

Problem is that some tyres have attributes assigned to them which the owner needs to know in order to give them the right product.

Does anyone know of a way to add the product attribute to the order. Or at very least make the product name a link to the product on the site?

New member

Posts

Joined
Fri Mar 22, 2013 7:29 pm

User avatar
Active Member

Posts

Joined
Sat Mar 30, 2013 12:27 am
Location - Springfield, MA

Post by reececropley » Wed Feb 12, 2014 6:12 pm

I would say I am average at a push.

I can write SQL statements and PHP to return the information but I find OpenCart hard to work with. Mainly due to the MVC confusing me.

Is this something you have coded (dirty or not) before? Could you send me an example?

I was thinking that turning the product name into a link to the product on the site would be an easy solution. Is this something you have seen?

New member

Posts

Joined
Fri Mar 22, 2013 7:29 pm

Post by tacobandito » Tue Feb 18, 2014 2:13 pm

Yeah, that should be fairly easy to do. You can search either the oc_product or oc_product_description table with some SQL and match the product name to a product_id. From there you could navigate (via while-in-while loop or a left join) to oc_product_attribute and print it to the email. For a link, you could just match the name to the id, and then print the standard-not-seo-url link to the email. i.e. /index.php?route=product/product&product_id=XXX

Clearly, the link is a little easier. But either way, pretty simple when it's straight SQL and not the proper MVC.

[module] PayPal Pro w/Recurring Profiles FREE
[module] 1 Click "Amazon Style" Checkout w/PayPal Pro FREE
[module] Adjustable PayPal Pro Fee FREE
[module] Add Sample To Cart LITE FREE
The guide to fixing just about everything wrong with OpenCart FREE!
Add INFINITE SCROLL to your homepage for FREE!
Live update product price for FREE!
Dynamic generation of Opencart coupon, FREE!
Hire me


User avatar
Active Member

Posts

Joined
Sat Mar 30, 2013 12:27 am
Location - Springfield, MA
Who is online

Users browsing this forum: No registered users and 4 guests