Jump to content

red sun

Member
  • Posts

    42
  • Joined

  • Last visited

Everything posted by red sun

  1. The rewrite code below strips out the quesrystring and redirects any link that contains "spectacle_shop". Looks like we may now be going for the more painful task of redirecting the old product URL to new the product URL for several hundred products. Fine to mark this as resolved - many thanks again for your input. RewriteCond %{REQUEST_URI} spectacle_shop RewriteRule ^$ https://spectacles.com/index.php [L,R=301]
  2. You think it's best to retain the query string. Will look into that - many thanks.
  3. The new site was built in CC5 and all content was added in from scratch so there aren't any CC4 URLs to worry about. The problem is that Google still brings up the occasional reference to the old site URLs for general product searches and as you spotted they're very similar to CC4. The CC4 rewrite rules were causing a "Category not found" error in CC5. I've asked the client to delete any old Google Shopping entries and we're hoping that will stop them showing up in searches in future. We've checked that Google is indexing the site correctly and that sitemap.xml.gz is being picked up. In the meantime I had to come up with a soltion which didn't lead to 404s when customers click the old link as we think it's been damaging the Google ranking pretty badly, hence the need for a rewrite/redirect based on a string we know existed in all the old site URLs.
  4. Aha - apologies, I should have been much more specific. The previous site wasn't CubeCart but looking at the URL structure it does look similar.
  5. Thankfully there won't be any CC4 URL structures as the site was developed and launched on CC5. Many thanks for your assistance - not sure how I mark this as resolved.
  6. Ah. I stripped all the CC4 Rewrite statements out. Are they still required for a CC5 site that wasn't upgraded from CC4?
  7. Aha - I had the CC4 SEO backwards compatibility in the .htaccess as well. Stripped that out and it's working now. Ended up putting the domain into the redirect as well. RewriteCond %{REQUEST_URI} spectacle_shop RewriteRule ^$ https://spectacles.com/index.php [L,R=301]
  8. Many thanks. That worked but the URL that I end up on shows the complete server path: http://spectacles.com/var/www/vhosts/spectacles.com/httpdocs/index.php Looks like my redirect is malformed - will try to hunt down the correct syntax.
  9. We have old URLs still turning up on Google for a site that was launched months ago. I'm trying to modify the .htaccess file to catch any URL that contains a specific string in the URL which is from the old site - for example "spectacle_shop" (eg: https://spectacles.com/spectacle_shop/cat_544283-RayBan.html?_a=category&cat_id=544283"). <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*)\.html?$ index.php?seo_path=$1 [L,QSA] RewriteCond %{REQUEST_URI} spectacle_shop RewriteRule .* index.php [L,R=301] </IfModule> The existing CubeCart .htaccess code is taking preference as the site always redirects back to the root URL followed by /.html which results in a 403 errror. Please note I've changed the actual shop URL and string we're looking for as I don't want Google indexing them again through this post. The whole site is under an SSL cert so all URLs start with https:// Many thanks for any advice.
  10. I have a CC v5.2.16 site where several customers have an issue with the checkout process. In some cases they have to click the "Checkout" button up to three times in order to proceed from the address page as they keep getting the "Address has been updated" message at the top of the page. I tried setting "My delivery address is the same as my billing address" to checked by default to try to get round the issue (for most customers) but I still get the "Address has been updated" message every time I click the "Checkout" button, even if the address hasn't been updated. I even get the message if I revisit the page and don't touch the "My delivery address is the same as my billing address" check-box when clicking the "Checkout" button. This is causing a bit of confusion. Is there any way to turn off just this one message so that the user is directed to the next stage of the checkout process (payment options) without a page refresh and "Address has been updated" message? Many thanks...
  11. Many, many thanks for this. For anyone else looking for this it's line 266 of /admin/sources/orders.index.inc.php in CC 5.2.16
  12. I have a CC5 store with lots of options per product. Line 149 of admin/skins/templates/orders.index.php just has the variable {$product.options} which produces a linear list which is very difficult to read when there are lots of options (see screen grab). Please could someone let me know where {$product.options} is created and if it's possible to amend the code to add <br /> tags at the end of each option. Many thanks...
  13. Hi again. Is there a potential work-around if it's not possible to provide a hook for the calculations for the View Basket and checkout/gateway processes? One thing I thought of is creating a product option which contains the values for all the possible product option totals (from 1 to 300 or so). I could set the value of the product option drop-down using JavaScript and it's value would then be stored with the order and used for calcuating the total price. It's a bit convoluted and the big draw-back with this is the fact that Cubecart doesn't store the option cost values in the product option but rather with each individual product which would mean that creating the products would take a very long time (even if cloning a 'master' product). Is there any way that we could import the 3,000+ products by CSV as planned and then apply the same product options and corresponding option cost values to every product in one go?
  14. I've finally managed to re-write the entire jQuery for the product options, using option text fields to store the customer's options rather than select drop-downs populated from the CubeCart admin area. This means I can now import a product CSV for the 3,000+ products and it will also make the task of updating the options and prices each year a lot simpler - I just have to update my jQuery script and the hard-coded values in "content.product.php". I have a product option text field on the page ( name="productOptions[24][]" ) which is storing the product options total cost with the order, but had to revert to using an additional field as suggested by bsmither - "my_options_total" - as the square brackets assigned by CubeCart to the field name appeared to be causing a problem with the snippet scripts. bsmither's snippets for using a text field to calculate the Shopping Basket sidebox values are working perfectly - see the example site at: http://framedindulgence.redsundesign.co.uk (the Shopping Basket sidebox is in the masthead area). You have to select a prescription lens to trigger the options (single, bi-focal, vari-focal). I have left the product options text fields which are getting stored with the order as visible for now (under the product image) but I'll hide these on the final version. I only had them visible to easily verify the values being written to them. Likewise, the test calculation fields under the "buy" button will also be hidden in the final version. I'd really appreciate help with getting the Shopping Basket sidebox values into the checkout. Would it help that we can make reference to the value stored with the order in "productOptions[24][]" ? Many thanks again...
  15. Many thanks for this. I think it might be best for me to work up an example of the product detail page so you can see what I'm trying to create. I've backed up my previous version which used the complex product options stored in admin. Please bear with me, it will take a while to re-write the jQuery and set up the new text-field only product options.
  16. I'm not familiar with implementing hooks, but understand that this would probably be preferable to hard edits which would need to be replicated whenever I carry out a CC update. I'm not overly worried that the option costs are summed into the product's total cost, as long as the value of {$CART_TOTAL} in box.basket.php also remains accurate. I can create an "options total" text field option and write the calculated option total in via jQuery to store the value with the product order. It's the value from this field that we'd want added to the product's original price (or sale price) in any case. I'm more than happy to implement the simplest solution you can find.
  17. Many thanks - I had been looking at "cart.class.php" for clues to how to pass a single jQuery-calculated total for all options but it's beyond my limited programming ability, especially when it comes to storing it with the order. Really appreciate your input.
  18. Please bear with me on this one... I'm developing a site for a client with over 3,000 products with the same 5 dependent select boxes (eg: click option 3 from select #1 - select #4 becomes visible) with approximately 10 differently-priced options each per select box. I've spent days writing over 500 lines of jQuery just to handle the visibility of the dependent select boxes and options and also provide a running total on the product detail page. My biggest issue is with the way CubeCart assigns product options. I can create option sets to quickly assign all the options to each product but the option prices are added per product rather than stored with the master option. If my client wants to import the basic product information from a CSV from their old site they are going to have to manually add prices for over 50 options to 3,000 products. I can clone a single completed product with option prices in place and amend product name, price, description, seo meta info etc per product but this means that importing a CSV isn't possible. In addition, I dread to think of trying to update 3,000 x 50 product option prices next year. A basic search and replace on the database won't do the job as some option prices are currently the same but may need to differ in the future. I'd love to be able to bypass the lengthy product options in the admin area and hard-code the options as tick boxes (or selects, radio buttons - whatever suits) into "content.product.php" as they are the same for every single product, and then use jQuery or similar to set 5 text field option values to hold the selected product option text (eg: "option 4: +£5.00" etc) so it gets stored with the order - this bit I can do. However I'd also need to be able to pass a total for the product option prices to the "view basket" page so that the total price on the "view basket" page is correct and it gets stored with the order (eg: item price is £100, total of product options is £30 so the product total price on the "view basket" page is £130). This would make it so much easier to create the initial product inventory and update prices in the future as all I'd have to change are the hard-coded values in "content.product.php". Is there a means of having a product option text field which could pass a variable numeric value (the total of the product options) to be used in the calculation on the "view basket" page and which would also be stored with the order. This scenario hasn't been easy to describe - I appreciate your patience if you've got to the end. Many thanks Craig
  19. @bsmither - thank you so much. I'd also posted this under my old log-in for cubecartfroums.org as this forum was initially displaying a malware warning from Google. As I replied on cubecartfroums.org, this is exactly what I required. Can't wait to carry out the mods on the store and see this working. Thanks again...
  20. Hi there. I'm also desperately needing some help with this. I'd like to to set a custom sort order for products within each category in CC5, perhaps by targetting categories by ID? For example, list products in the category "books" by date-added (asc), "coming soon" by date-added (desc) and "authors" alphabetically (asc). I've seen the mod that allows a number to be placed next to each product, but this would be too difficult for the client to control, as in some instances it would require every product to be re-numbered. Any help much appreciated...
  21. My apologies, I must have been using an email address that I had used in a previous test, which was the reason the box was empty. All working perfectly now. Many thanks again for your assistance.
  22. Hi there - I'd noticed that as DreamWeaver was highlighting it as a syntax error when I pasted the code into the page. Even after correcting it I got a blank box with no confirmation message.
  23. I cleared the cache and tried the solution above without any success. It removes the form, but doesn't show the success message. I've used the solution you posted in this topic http://forums.cubecart.com/topic/47361-resolved-using-php-in-templates as it addresses my issue perfectly and means that we don't have to alter any core files, which is always the best approach. Many, many thanks for your assistance. Very much appreciated...
  24. Thank you - a much simpler and more appropriate way of acheiving the outcome rather than turning on PHP and altering core files - thanks again...
  25. To get the admin area working change the following in controllers/controller.admin.pre_session.inc.php $GLOBALS['smarty'] = new Smarty(); to $GLOBALS['smarty'] = new SmartyBC();
×
×
  • Create New...