manu0310 Posted March 21, 2007 Posted March 21, 2007 Hi, I am working on a project that involves modifying an existing shopping cart. osCommerce is setup on the site and I do see the current inventory being displayed, however I was wondering if anyone knew what I need to do in order to add the "add to my cart " functionality for each item. What I mean is that I would like to have people click on the item and view a description with the price and be able to add it to their cart. Is there any web interface in osCommerce that allows me to access such information. Any help would be appreciated. Thanks.
wizardsandwars Posted March 21, 2007 Posted March 21, 2007 If it's oscommerce, it should already have the 'add to cart' functionality. A working URL would help. ------------------------------------------------------------------------------------------------------------------------- NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit. If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.
manu0310 Posted March 21, 2007 Author Posted March 21, 2007 If it's oscommerce, it should already have the 'add to cart' functionality. A working URL would help. Hey www.mrchipsclothing.com . I is all setup but I don't know how to modify the products page to allow people to click on an item and view a description and allow them to purchase the item
wizardsandwars Posted March 22, 2007 Posted March 22, 2007 Whoever put this site together didn't do a very good job of integrating the cart into the html template. By default, osCommerce already has all the 'Add To Cart' buttons functioning. This cart looks like the product listing page is all messed up. In fact, it looks like someone jsut copy and pasted HTML of the product images where the dynamic content is supposed to go. Is that what happened? ------------------------------------------------------------------------------------------------------------------------- NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit. If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.
manu0310 Posted March 22, 2007 Author Posted March 22, 2007 Whoever put this site together didn't do a very good job of integrating the cart into the html template. By default, osCommerce already has all the 'Add To Cart' buttons functioning. This cart looks like the product listing page is all messed up. In fact, it looks like someone jsut copy and pasted HTML of the product images where the dynamic content is supposed to go. Is that what happened? The product listing is dynamic. I have access to all the dbs and I can see all the products in the mySQL DB, however it seems that a lot of the features haand change certain features live been disabled. For instance I can log into the admin page and change certain features such as adding the prodcut price . etc. I did have a problem however when I tried to add the "Buy now" button to the products. I get a nast mySQL error saying that I cant use the order by limit command???? .. Do u know how to get around this.
wizardsandwars Posted March 22, 2007 Posted March 22, 2007 The product listing is dynamic. I have access to all the dbs and I can see all the products in the mySQL DB, however it seems that a lot of the features haand change certain features live been disabled. For instance I can log into the admin page and change certain features such as adding the prodcut price . etc. I did have a problem however when I tried to add the "Buy now" button to the products. I get a nast mySQL error saying that I cant use the order by limit command???? .. Do u know how to get around this. I'd have to look at the altered code. It looks like a complete mess to me. Are you able to navigate to the individual product pages at all? If not, what are some of the product IDs? ------------------------------------------------------------------------------------------------------------------------- NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit. If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.
wizardsandwars Posted March 22, 2007 Posted March 22, 2007 The product information appears to be there, but it doens't seem to be linked form the product listing page. You can see the individual product information page at .... http://www.mrchipstees.com/store/product_i...?products_id=26 If you enter a real product id on the end of that url instead of '26', you should see a real product information page. The page that you are seeing is actually a 'category page' http://www.mrchipstees.com/store/index.php?cPath=23 However, the template is all messed up, in that it's not dynamically providing the links to the individual product pages, and other dynamic information (such as the buy it now button). Again, whoever tried to integrate the category page template into this cart screwed up. ------------------------------------------------------------------------------------------------------------------------- NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit. If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.
manu0310 Posted March 22, 2007 Author Posted March 22, 2007 The product information appears to be there, but it doens't seem to be linked form the product listing page. You can see the individual product information page at .... http://www.mrchipstees.com/store/product_i...?products_id=26 If you enter a real product id on the end of that url instead of '26', you should see a real product information page. The page that you are seeing is actually a 'category page' http://www.mrchipstees.com/store/index.php?cPath=23 However, the template is all messed up, in that it's not dynamically providing the links to the individual product pages, and other dynamic information (such as the buy it now button). Again, whoever tried to integrate the category page template into this cart screwed up. ok I see what your saying. It is a mess indeed!! Would you say it would be a better idea to just reinstall and configure a new version of osCommerce. Meaning just backup the site and the dbs and try to install osCommerce on a test folder which will have an identical copy of the site. How easy would it be to modify that new version of osCommerce with all the images on the current site.. providing I have all the images?
wizardsandwars Posted March 22, 2007 Posted March 22, 2007 ok I see what your saying. It is a mess indeed!! Would you say it would be a better idea to just reinstall and configure a new version of osCommerce. Meaning just backup the site and the dbs and try to install osCommerce on a test folder which will have an identical copy of the site. How easy would it be to modify that new version of osCommerce with all the images on the current site.. providing I have all the images? Would you say it would be a better idea to just reinstall and configure a new version of osCommerce I'd have to look very closely at the code. It looks like you have templating system installed, and applying the template is probably where things went wrong. Is this just an HTML template? Or was this a template that was supposed to be designed specifically for osCommerce? If it's just an html template and you (or someone else) tried to install a templating system and plug in the template, then what I would do is back up the database, reinstall the stock version of osC, and then integrate the template without the templating system. If it's a tempalte that was supposed to be designed specifically for osC then you should ask for a refund. Modifying a new version of oscommerce with all of hte images and the stock html wouldn't be difficult for someone that has done it before. ;-) ------------------------------------------------------------------------------------------------------------------------- NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit. If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.
manu0310 Posted March 22, 2007 Author Posted March 22, 2007 I'd have to look very closely at the code. It looks like you have templating system installed, and applying the template is probably where things went wrong. Is this just an HTML template? Or was this a template that was supposed to be designed specifically for osCommerce? If it's just an html template and you (or someone else) tried to install a templating system and plug in the template, then what I would do is back up the database, reinstall the stock version of osC, and then integrate the template without the templating system. If it's a tempalte that was supposed to be designed specifically for osC then you should ask for a refund. Modifying a new version of oscommerce with all of hte images and the stock html wouldn't be difficult for someone that has done it before. ;-) So how do I know if I have a templating system in place? I do think its just an html template and it wasnt one designed specifically for osCommerce . If this is the case then starting fresh wouldn't be a very big deal correct ? I mean I am a computer science grad student and I do have knowledge in php, mySQL web development. would I be able to take some of the existing osCommerce settings such as the merchant account and the pricing and apply them to my new installation ?
wizardsandwars Posted March 22, 2007 Posted March 22, 2007 would I be able to take some of the existing osCommerce settings such as the merchant account and the pricing and apply them to my new installation ? What version of osC are you using now? Also, how many contributions have you added to the existing cart that altered the database? If you haven't made any changes to the database, and your existing cart is still running milestone 2.2 (which is a few years old now), then you should be able to re-use your current database with a fresh installation of osCommerce, keeping most of the configuaration settigns, categories, products, prices, etc... intact. ------------------------------------------------------------------------------------------------------------------------- NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit. If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.
manu0310 Posted March 22, 2007 Author Posted March 22, 2007 What version of osC are you using now? Also, how many contributions have you added to the existing cart that altered the database? If you haven't made any changes to the database, and your existing cart is still running milestone 2.2 (which is a few years old now), then you should be able to re-use your current database with a fresh installation of osCommerce, keeping most of the configuaration settigns, categories, products, prices, etc... intact. Hey I really appreciate all the help. How do I know what version I am running ? Also I really don't know what contributions were added to the cart since this whole system wasnt implemented by me. Is there any way of checking that as well... I have access to all the DB's and the osCommerce admin... Im just not familiar with it at all.
manu0310 Posted March 22, 2007 Author Posted March 22, 2007 Oh bytw .. the product pages do work if there is a valid product id given, for instance http://www.mrchipstees.com/store/product_i...?products_id=34 . This link works fine ... I'm having trouble actually linking to there from the catalog listing. For instance when I am in admin view under configuration->product listing - > I enable the "buy now" option to be displayed and I am not successful. I get the following PHP error: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'limit 0, 16' at line 1 select p.products_image, p.products_model, p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '21' order by limit 0, 16 [TEP STOP] So apparently something is messed up with this SQL query.
Guest Posted March 23, 2007 Posted March 23, 2007 http://www.oscommerce.com/forums/index.php?showtopic=144095 Goggle works wonders for finding things fast. (oscommerce.com, "You have an error in your SQL syntax") I hope that helps, I have never had that error before. Read the thread first.
wizardsandwars Posted March 23, 2007 Posted March 23, 2007 Yeah, there's an order by clause, but no columns. order by limit 0, 16 In the PHP it says something like '...order by'. $this_row-> prodcuts[name].' limit 0, 16' But the $this_row-> prodcuts[name] array element is null, so the end result is order by limit 0, 16 Which causes a SQL error. This is a very general error, and only means that the SQL provided to MySQL contains a syntax error. THe root of the problem is still the template integration. Try turning the template off, or un-installing the template. ------------------------------------------------------------------------------------------------------------------------- NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit. If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.