Jump to content

avyona

Member
  • Posts

    44
  • Joined

  • Last visited

Everything posted by avyona

  1. I commented it out in the vieworder.inc.php and also in the template and it knocked off 4 secs but its still at 11.5 sec its showing there is a redirect on the download....I'll bet that is the culprit!! Hmmm now where did I add that lol!! off to go dig
  2. I'll try commenting it out again and running a ping on it. I think i have done it before it and it didnt help: So for the query: how would you rewrite that to exclude the customer id?
  3. <?php if (eregi(".inc.php",$HTTP_SERVER_VARS['PHP_SELF']) || eregi(".inc.php",$_SERVER['PHP_SELF'])) { echo "<html>\r\n<head>\r\n<title>Forbidden 403</title>\r\n</head>\r\n<body><h3>Forbidden 403</h3>\r\nThe document you are requesting is forbidden.\r\n</body>\r\n</html>"; exit; } $view_order=new XTemplate ("skins/".$config['skinDir']."/styleTemplates/content/viewOrder.tpl"); $view_order->assign("LANG_YOUR_VIEW_ORDER",$lang['front']['viewOrder']['order_no']." ".treatGet($_GET['cart_order_id'])); $order = $db->select("SELECT * FROM ".$glob['dbprefix']."CubeCart_order_sum INNER JOIN ".$glob['dbprefix']."CubeCart_customer ON ".$glob['dbprefix']."CubeCart_order_sum.customer_id = ".$glob['dbprefix']."CubeCart_customer.customer_id WHERE ".$glob['dbprefix']."CubeCart_order_sum.cart_order_id = ".$db->mySQLSafe($_GET['cart_order_id'])." AND ".$glob['dbprefix']."CubeCart_order_sum.customer_id=".$db->mySQLsafe($ccUserData[0]['customer_id'])); if($order == TRUE){ //$view_order->assign("LANG_CUSTOMER_INFO",$lang['front']['viewOrder']['customer_info']); //$view_order->assign("LANG_INVOICE_ADDRESS",$lang['front']['viewOrder']['invoice_address']); //$view_order->assign("VAL_INVOICE_NAME",$order[0]['name']); //$view_order->assign("VAL_INVOICE_ADD_1",$order[0]['add_1']); //$view_order->assign("VAL_INVOICE_ADD_2",$order[0]['add_2']); //$view_order->assign("VAL_INVOICE_TOWN",$order[0]['town']); //$view_order->assign("VAL_INVOICE_POSTCODE",$order[0]['postcode']); //$view_order->assign("VAL_INVOICE_COUNTRY",countryName($order[0]['country'])); //$view_order->assign("LANG_DELIVERY_ADDRESS",$lang['front']['viewOrder']['delivery_address']); //$view_order->assign("VAL_DELIVERY_NAME",$order[0]['name_d']); //$view_order->assign("VAL_DELIVERY_ADD_1",$order[0]['add_1_d']); //$view_order->assign("VAL_DELIVERY_ADD_2",$order[0]['add_2_d']); //$view_order->assign("VAL_DELIVERY_TOWN",$order[0]['town_d']); //$view_order->assign("VAL_DELIVERY_POSTCODE",$order[0]['postcode_d']); //$view_order->assign("VAL_DELIVERY_COUNTRY",$order[0]['country_d']); //if(empty($order[0]['customer_comments'])){ // $view_order->assign("VAL_CUSTOMER_COMMENTS",$lang['front']['viewOrder']['na']); //} else { // $view_order->assign("VAL_CUSTOMER_COMMENTS",$order[0]['customer_comments']); //} //$view_order->assign("LANG_CUSTOMER_COMMENTS",$lang['front']['viewOrder']['customer_comments']); $view_order->assign("LANG_ORDER_SUMMARY",$lang['front']['viewOrder']['order_summary']); $view_order->assign("LANG_PRODUCT",$lang['front']['viewOrder']['product']); //$view_order->assign("LANG_PRODUCT_CODE",$lang['front']['viewOrder']['product_code']); $view_order->assign("LANG_QUANTITY",$lang['front']['viewOrder']['quantity']); $view_order->assign("LANG_PRICE",$lang['front']['viewOrder']['price']); $products = $db->select("SELECT * FROM ".$glob['dbprefix']."CubeCart_order_inv WHERE cart_order_id = ".$db->mySQLSafe($_GET['cart_order_id'])); for($i=0;$i<count($products); $i++){ if($products[$i]['digital']==1 && ($order[0]['status']>=2 && $order[0]['status']<=3) ){ // get digital info // Downloadable Product Options by convict --> $dpo_config = fetchDbConfig("Downloadable_Product_Options"); if (isset($dpo_config['status']) && $dpo_config['status']==1) { $query = "SELECT * FROM ".$glob['dbprefix']."CubeCart_Downloads INNER JOIN ".$glob['dbprefix']."CubeCart_order_inv ON ".$glob['dbprefix']."CubeCart_Downloads.productId = ".$glob['dbprefix']."CubeCart_order_inv.productId WHERE ".$glob['dbprefix']."CubeCart_Downloads.cart_order_id = ".$db->mySQLSafe($_GET['cart_order_id'])." AND ".$glob['dbprefix']."CubeCart_Downloads.optionItem = ".$glob['dbprefix']."CubeCart_order_inv.dpo AND ".$glob['dbprefix']."CubeCart_Downloads.productId = ".$db->mySQLSafe($products[$i]['productId']). " AND ".$glob['dbprefix']."CubeCart_order_inv.id = ".$db->mySQLSafe($products[$i]['id']); $download = $db->select($query); } else { // original code -> $query = "SELECT * FROM ".$glob['dbprefix']."CubeCart_Downloads INNER JOIN ".$glob['dbprefix']."CubeCart_inventory ON ".$glob['dbprefix']."CubeCart_Downloads.productId = ".$glob['dbprefix']."CubeCart_inventory.productId WHERE cart_order_id = ".$db->mySQLSafe($_GET['cart_order_id'])." AND ".$glob['dbprefix']."CubeCart_Downloads.productId = ".$db->mySQLSafe($products[$i]['productId']); $download = $db->select($query); // <- } // <-- Downloadable Product Options by convict $view_order->assign("VAL_DOWNLOAD_LINK",$glob['storeURL']."/download.php?pid=".$download[0]['productId']."&oid=".base64_encode($_GET['cart_order_id'])."&ak=".$download[0]['accessKey']); $view_order->assign("LANG_DOWNLOAD_LINK",$lang['front']['viewOrder']['download_here']); $view_order->parse("view_order.session_true.order_true.repeat_products.digital_link"); } $view_order->assign("TD_CLASS",""); $view_order->assign("VAL_PRODUCT",$products[$i]['name']); //$view_order->assign("VAL_PRODUCT_OPTS",$products[$i]['product_options']); $view_order->assign("VAL_IND_QUANTITY",$products[$i]['quantity']); //$view_order->assign("VAL_IND_PROD_CODE",$products[$i]['productCode']); $view_order->assign("VAL_IND_PRICE",priceFormat($products[$i]['price'])); $view_order->parse("view_order.session_true.order_true.repeat_products"); } ///////////////////////////////////////////FREEBIES INCLUDE GOES HERE////////////////////////////////// include("includes/content/free.inc.php"); $view_order->assign("LANG_ORDER_LIST",$lang['front']['viewOrder']['review_below']); $view_order->assign("LANG_ORDER_TIME",$lang['front']['viewOrder']['order_date_time']); $view_order->assign("VAL_ORDER_TIME",formatTime($order[0]['time'])); //$view_order->assign("LANG_GATEWAY",$lang['front']['viewOrder']['payment_method']); //$view_order->assign("VAL_GATEWAY",str_replace("_"," ",$order[0]['gateway'])); //$view_order->assign("LANG_SHIP_METHOD",str_replace("_"," ",$lang['front']['viewOrder']['ship_method'])); //$view_order->assign("VAL_SHIP_METHOD",$order[0]['shipMethod']); $view_order->assign("LANG_SUBTOTAL",$lang['front']['viewOrder']['subtotal']); $view_order->assign("VAL_SUBTOTAL",priceFormat($order[0]['subtotal'])); //.: adg_coupon_mod http://www.alexgoldberg.com/cubemods :. $view_order->assign("LANG_COUPON",$lang['front']['cart']['coupon']."<br>".$order[0]['coupon_code']); $view_order->assign("VAL_COUPON",priceFormat($order[0]['coupon_savings'])); //.: adg_coupon_mod :. //$view_order->assign("LANG_TOTAL_TAX",$lang['front']['viewOrder']['total_tax']); //$view_order->assign("VAL_TOTAL_TAX",priceFormat($order[0]['total_tax'])); //$view_order->assign("LANG_TOTAL_SHIP",$lang['front']['viewOrder']['shipping']); //$view_order->assign("VAL_TOTAL_SHIP",priceFormat($order[0]['total_ship'])); $view_order->assign("LANG_GRAND_TOTAL",$lang['front']['viewOrder']['grand_total']); $view_order->assign("VAL_GRAND_TOTAL",priceFormat($order[0]['prod_total'])); $view_order->parse("view_order.session_true.order_true"); } else { $view_order->assign("LANG_NO_ORDERS",$lang['front']['viewOrder']['order_not_found']); $view_order->parse("view_order.session_true.order_false"); } $view_order->assign("LANG_LOGIN_REQUIRED",$lang['front']['viewOrder']['login_required']); if($ccUserData[0]['customer_id']>0) $view_order->parse("view_order.session_true"); else $view_order->parse("view_order.session_false"); $view_order->parse("view_order"); $page_content = $view_order->text("view_order"); ?>Here is my vieworder.inc.php file contents and here is an excerpt from the free.inc.php file...Its too long to post but I'll post the queries its pulling. <?php ///testing new query $order = $db->select("SELECT prod_total, time, status, CubeCart_order_sum.customer_id, cart_order_id FROM ".$glob['dbprefix']."CubeCart_order_sum INNER JOIN ".$glob['dbprefix']."CubeCart_customer ON ".$glob['dbprefix']."CubeCart_order_sum.customer_id = ".$glob['dbprefix']."CubeCart_customer.customer_id WHERE ".$glob['dbprefix']."CubeCart_order_sum.cart_order_id = ".$db->mySQLSafe($_GET['cart_order_id'])." AND ".$glob['dbprefix']."CubeCart_order_sum.customer_id=".$db->mySQLsafe($ccUserData[0]['customer_id'])); $prod_total = $order[0]['prod_total']; $time = $order[0]['time']; $status = $order[0]['status']; //////////Dec 28-Jan20/////////// if ($prod_total > '4.90' && $time > '1293494401' && $time < '1295600400' && $status > '1') { $view_order->assign("FREEBIE_LINK",$glob['storeURL'].'/2We5t86aCq35iGmfLI1iI/pages/sweetheartalpha.html'); $view_order->assign("FREEBIE_NAME",'FREEBIES'); $view_order->parse("view_order.session_true.order_true.freebies"); } if ($prod_total > '9.90' && $time > '1293494401' && $time < '1295600400' && $status > '1') { $view_order->assign("FREEBIE_LINK",$glob['storeURL'].'/2We5t86aCq35iGmfLI1iI/pages/dec28promo10.html'); $view_order->assign("FREEBIE_NAME",'FREEBIES'); $view_order->parse("view_order.session_true.order_true.freebies"); }
  4. you can see the site here: planetapplique.com and try posting this link to your browser as its a download link from a test order....you will see how slow! http://planetapplique.com/download.php?pid=1624&oid=MTQwMzIyLTIxMDEwMC03NzI0&ak=gdmlzMrn i can pm you a test login to use if youd like to see the account pages
  5. how would I go about adding the proper indexing to the database so that when a customer clicks the download link for a product it doesnt take 29 sec to pop the download dialog box? Is there any code changes or is it all done via indexes certain tables. If so which tables do I add index or PRIMARY KEYs to? Thanks in advance...sorry to bump this one but I was doing some pings on the downloads and have finally pinpointed what element on the viewOrder.inc.php page that causes such huge delays
  6. I never even thought of moving my current modded cc3 to a fresh server and then upgrading that install...I ...feel....stupid....now And thank you for the clarification and the time you took to address each point
  7. haha!! I can imagine I have crowbar'ed much myself
  8. Oh cool! I would totally pay for the cc5 mod version of multi download prods. Let me know if you find it and PM me. The bundle mod I did check it out but each product has 12 formats and that would be hard to pull off haha!
  9. Are you the author of this one? hehe I love this mod!! I discovered it years after my store went live so I couldnt implement it because it only works on newly created products I believe. I always wanted to use it though. What a great mod and I would ADORE seeing it on cc6!!! So to answer your questions yes I am suggesting it for cc6 There is a mod (I think for V3 and V4) that allowed download files to be associated with product options which you did say wouldnt be as good but we have this working on a couple of client sites and it works well. There isnt a version for V5 / V6 so it might be something we would look to write Ian I remember this mod as well, it is a good one and works well. Our business sells software for embroidery machines. So what happens is the customer is using Singer, for instance, and they switch to Brother sewing machines, then they would have to purchase it again. I get compliments for offering all the sewing machine formats in my downloads. I wouldnt want to change that on them. BUT making those files smaller and in portions would allow them to access any format for any product should the need arise to get another file format due to switching machines.
  10. I am in the process of moving my CC3 store into a CC6 store. I have decided not to just simply "upgrade" through admin because I am using CC3 and well the databases are different. I wanted a fresh slate to work from and to test before going live. I have a few questions: 1. I have thousands of products which I have successfully imported into the new database, except for the image column. Can I FTP images to the source folder and then add then to products? I noticed the new CC6 generates a few different versions of the images. Several sizes so to speak. I guess what I am asking is when do the extra sizes get generated? When editing a product and assigning an image to it or during image upload in the admin? I really dont want to have to manually upload one at a time with thousands of images. Having to manually assign them to each product is going to suck already. 2. Can I also import the order tables, downloads table into cc6 and it be compatible with cc3? Right now I am seeing a few differences. IF NOT, would it be more feasible to simply make the CC3 database be pulled when a customer wants to view a past order (pre CC6). Maybe via a link in their account that reads "2009-2014 Order History" and when clicked it queries the old database. How does one do that by the way lol? Link to another database? What kind of php code would I need to use? 3. How exactly do code hooks work? I usually edit the core files, although I hate doing this and would love to simple append to existing code. 4. If I wanted to offer a free mod to the CC6 database, what are the requirements? 5. Is the forgot password in the new CC6 better than CC3? I get daily emails (10 a day at least) of customers who forgot their password and the generated one doesnt work. I have to manually reset several passwords a day using someones edit customer cc3 mod. 6. Where in the world have all the cubecart modders gone?! There are so few mods available. I'm hoping its because less are needed! Thats all I can think of now. I'm still moving database tables over one at a time. I DID notice that when I moved customers that the SALT column doesnt exists in CC3 as it does in CC6. I tried logging in with one of the customers from the old database and the SALT was generated so that was good news!!
  11. It would be nice to be able to provide multiple download links for one product. I sell zip files or digital downloads. I think this would be an invaluable plugin to reduce server strain because it could dish out one portion of the download instead of one giant file. The customer could select which version to download. Doing it as product options isnt as productive because if the customer changed platforms they would have to repurchase it just to download the new format they need. There used to be a mod for one of the CC versions that did this. I cant remember who put it out. Anyway I thought this would be a helpful means of putting less stress on the server.
  12. Ian do you feel that an upgrade to cc6 will be of significant help?
  13. off topic question...im importing cc3 product catalogue into the cc6 using the import tool. I dont see an option in the drop down for product id? Is there a reason or am I missing something? Here is what I could find in regards to memory
  14. so just take my above quote query and put in the actual values and run it in phpadmin? I can do that. PHPadmin is my friend! Sorry for the confusion on the version. I would love to switch to cc6 and hope to, I just wanna make sure that something else isnt going on that is causing a horrid problem. Do you think I will be able to import cubecart_downloads and order inv into cc6 despite the size of it and do it successfully? Or should I just tell my customers that their old orders are bye bye and warn them to download before it all gets wiped?
  15. I'm running cc3 heavily modded...and I mean heavily with tons of my own personal coding. I have 32 GB of mem on the rack. How would I go about archiving out orders? I have already gone through and deleted customers who have 0 orders...that removed like 15k customers, but we still have 75k customers still. Bsmither, yes I get enormous lag in the admin when editing an order, viewing an order. Especially on black friday. I just give up on those kinda days. A thing to consider is that I run a free.inc.php file attached to the vieworder.inc.php that contains if statements for each week spanning the past 4 years or so. Each week I edit my free.php file to create a new if statement... here is an example. keep in mind there are probably 300 if statements in this file and this is only two of them. Notice how the timestamps bump up to each other. the result is that there is a button at the bottom of the order summary page that can be clicked and a popup window displays download links to free products. Could this be what is slowing things down so badly? I mean I know if doesnt help things, but I'm not sure how else to give customers free downloads of our products cause you can only do one coupon at a time ya know? lol its a friggin mess. $order = $db->select("SELECT prod_total, time, status, CubeCart_order_sum.customer_id, cart_order_id FROM ".$glob['dbprefix']."CubeCart_order_sum INNER JOIN ".$glob['dbprefix']. "CubeCart_customer ON ".$glob['dbprefix']."CubeCart_order_sum.customer_id = ".$glob['dbprefix']. "CubeCart_customer.customer_id WHERE ".$glob['dbprefix']. "CubeCart_order_sum.cart_order_id = ".$db->mySQLSafe($_GET['cart_order_id'])." AND ".$glob['dbprefix']. "CubeCart_order_sum.customer_id=".$db->mySQLsafe($ccUserData[0]['customer_id'])); $prod_total = $order[0]['prod_total']; $time = $order[0]['time']; $status = $order[0]['status']; //////////JUNE23-MADELINE FONT, BANNER ALPHA, COWBOY BIRTH MONTHS'/// if ($prod_total > '4.90' && $time > '1435092677' && $time < '1436208463' && $status > '1') { $view_order->assign("FREEBIE_LINK",$glob['storeURL'].'/2We5t86aCq35iGmfLI1iIxxxxxx56/pages/ JUNE-23-2015-53GO9.html'); $view_order->assign("FREEBIE_NAME",'FREEBIES'); $view_order->parse("view_order.session_true.order_true.freebies"); } if ($prod_total > '9.90' && $time > '1435092677' && $time < '1436208463' && $status > '1') { $view_order->assign("FREEBIE_LINK",$glob['storeURL'].'/2We5t86aCq35iGmfLI1iIxxxxxx56/pages/ JUNE-23-2015-103V44.html'); $view_order->assign("FREEBIE_NAME",'FREEBIES'); $view_order->parse("view_order.session_true.order_true.freebies"); } //////////JULY 6- BLASTOFF, SPACESHIP, SPACE FONT/////////// if ($prod_total > '4.90' && $time > '1436208464' && $time < '1436831215' && $status > '1') { $view_order->assign("FREEBIE_LINK",$glob['storeURL'].'/2We5t86aCq35iGmfLI1iIxxxxxx56/pages/ JUL-6-2015-5T3I9.html'); $view_order->assign("FREEBIE_NAME",'FREEBIES'); $view_order->parse("view_order.session_true.order_true.freebies"); } if ($prod_total > '9.90' && $time > '1436208464' && $time < '1436831215' && $status > '1') { $view_order->assign("FREEBIE_LINK",$glob['storeURL'].'/2We5t86aCq35iGmfLI1iIxxxxxx56/pages/ JUL-6-2015-10L53T.html'); $view_order->assign("FREEBIE_NAME",'FREEBIES'); $view_order->parse("view_order.session_true.order_true.freebies"); }i forgot to mention that checkout on my website is horrendous as well. Customers just sit and stare waiting to connect to paypal. Another clue. ive already installed cc6.06 on a test domain and server and I am importing things over. Got customers so far. Scared to do products. I guess I want to know if my cc3 store can be fixed or if its time for me to move on to newer venues. I shudder to think that shopify, bigcommerce and the likes of them are my only options. I enjoy tinkering when I want. I have loved cc for years. But I dont dont to waste a lot of time moving everything over to cc6 and then be faced with these monsters all over again. The goal is to improve performance. I would throw more money at at even bigger server, but why? It should work fine what I have now.
  16. I am getting daily reports of customers not being able to download their digital products from their order detail page. They say they click...nothing happens the browser just thinks and thinks. I believe the database is suspect having 492,185 orders in it. And each of those orders have any number of individual download links. We are running a hostgator top dedicated server. I have already gone through and cleaned up unneccessary code, queries from mods and the like. Cubecart_Downloads and Cubecart_orderInv each = 2,500,000 rows. Cubecart_order_sum = 492,185 What should I do about this? I believe that the huge number of rows in over inv and downloads is accounting for some serious choking on our website. Using Pingdom tools doesnt help because it doesnt ping account pages etc. I have racked my brain. I must now humble myself and ask, "What would you do with a bulky database like this?" Thanks in advance
×
×
  • Create New...