Jump to content

cyanoxide

Members
  • Posts

    62
  • Joined

  • Last visited

Profile Information

  • First Name
    Jamie
  • Last Name
    Pates

Recent Profile Visitors

567 profile views

cyanoxide's Achievements

Newbie

Newbie (1/14)

1

Reputation

3

Community Answers

  1. Hi all, I've just been informed that theres an issue with the way jqueryui's date picker works on our back office product editor. For whatever reason when you first use it it displays correctly with both a date selector and a time selector however when you click save and stay and then open a new instance of the datepicker or if you refresh the page after clicking save and stay the time selector is absent and you can't type a time into the box either, you can however paste one in and that seems to work fine. This is the temporary solution I've given to them but I'll like to get to the bottom of the issue. I've checked the console and there isn't anything showing up there that would indicate an issue. We stay away from editing anything in the backoffice so I'm not sure what's causing this. I'm guessing it's a module and I'm just about to go through the lengthy process of disabling and re-enabling them to try to isolate the culprit but I was wondering if anyone had experienced this before and had a solution. Thanks.
  2. Hi all, I've currently trying to optimize my website and in doing so I'm trying to activate all the CCC features. As of right now I've got CCC merging all of my CSS except for one CSS file containing the majority of the custom CSS for the site. When I add this file into the autoload folder it shows up somewhere in the middle of the load order for CSS files however all of the module CSS files load in after this file and this causes conflicts. Is there a way to force this file to load after the modules? I could go through the file in question and add a tonne of important tags but it would take too long to try to work out which selectors will need these tags and in general that's a bad practice.
  3. I'm trying to get ratings to show up on the products displayed in the blockviewed module (The one that displays your most recently viewed products in the left sidebar) however I can't seem to get it working as it doesn't rely on the $product array to generate the products which I find kind of strange. I've found out how to pass various things from the $product array to the $viewedProduct array like the price for example using the "Product::getProductProperties" but the productcomments module doesn't store anything in the $product array either so I'm a bit stumped on how I can pass that information across. The ideal solution would be to pass across the average rating for that product so I can style it with stars. Any information regarding this issue will be greatly appreciated.
  4. I ended up solving the issue by adjusting my productController.php file. On approximately line 375 I changed the following code: $images = $this->product->getImages((int)$this->context->cookie->id_lang); to $images = $this->product->getImages(1); I did this because the original was using id_lang to get the current language and then using that to pull the array based on that however I know that the language I want to force has an id of "1" so I just entered that and now all my images only use the English captions regardless of what is typed in the other fields. I doubt it but if anyone else plans on doing the same they will need to check the ids of there languages and ensure they use the number associated with the language they wish to enforce as it may not be "1" like in my situation.
  5. So I'm currently using the image caption to get images to display in certain places on the product page. For example if I give the image a caption of "slider" it will only display in the slider on the page and this works well and allows me to display dynamic content without building extensive modules. My problem however is that if the site is set to a different language the images break because the caption changes to whatever it is listed as in that language. One solution to this problem is to manually go through each image for each product and make sure all the captions are the same but we currently have over 200 products with 5 languages and 6 images which would mean an insane amount of work to get this set up. Alternatively I could resolve this with a SQL query that takes the English caption and makes all the other languages use that value for their captions. However this solution will rely on our 30+ team all remembering to name each of their images in all languages going forward which I can guarantee will be forgotten at some point and it will be very difficult for us to monitor this. This leads me to believe that I need to find a way to get the English language to display in the $images variable so I can use that rather than the translated version or at least something along these lines. Any guidance regarding this would be greatly appreciated or if you have an alternative suggestion I'd love to hear it.
  6. Hi all, I'm looking to add an option to add and subtract product quanties from the cart via the Ajax Block cart similar to how it works on the shopping cart page. I've found some threads on here asking how to get this functionality working on a product page but that would only work adjusting a single product and I've tried ripping it from the shopping-cart.tpl file and putting it in the blockcart.tpl however I could only get this to work correctly if you're on the shopping cart page. I suspect there's a shopping cart controller with something in that needs to be copied but I'm not sure what part that would be and where I would need to move it to, maybe the front controller? Any guidance on this would be greatly appreciated.
  7. Hi all, Prestashop version 1.6.1.7 I'm experiencing a bit of an issue with both my production site and my staging site. I'm not sure when it happened but at some point my zip/post code verification stopped working on my authentication.tpl file. Regardless of what I input in the zip code field I get a red outline around the box and a red cross however the user can still submit regardless of this. I've seen a few posts relating to issues similar to this but none of which solve my problem. The strangest thing I found is that the zipcode verification on the address.tpl page still seems to be working properly. It's just the verification on the authentication file that is causing problems. A lot of the threads I have read mention either adjusting or replacing validate.js or statesManagement.js. I've tried making the suggested changes, replacing with their amended version and even replacing it with my bootstrap file as well as the latest version of the file available on the github for 1.6.x none of these solutions have resolved my problem. It's worth mentioning that we're an international company so we need to handle countries that have states and those that don't. The reason I bring this up is that one solution this problem I found removes or enforces states. Any guidance on this issue would be greatly appreciated. You an see the problem in action here on our staging site http://bit.ly/2FkGvLW Steps to replicate issue: Enter a fake email address in the account creation field Select Andora as the country Try to enter "AD500" (CNNN) in the zipcode field
  8. Hi all, We have quite strict policies in place when processing an order which results in quite a lot of payment errors filling up our order list admin page. Having the errors display there is quite useful as it means we can get in touch with them and guide them to a purchase however if they failed 4 times and then managed to purchase on the 5th that means 4/5 of those orders are irrelevant. it would be great if payment errors were removed/hidden if an order of the same value was accepted afterwards. Does anyone have any ideas on how we could achieve this or if it's even possible?
  9. Hi All, I've recently switched my instance of Prestashop over to use the advanced stock management system as we now have multiple warehouse to manage stock in however it's a very tedious process to add stock this way. I was wondering if anyone had any tricks to speed up this process as our operations guys are pulling their hair out trying to use this. I've tried looking for a module that might help but I couldn't seem to find anything that would definitely work. Perhaps some sort of CSV import/export module that has ASM (Advanced Stock Management) support. Maybe I'm just not looking hard enough so if any of you know of one that works feel free to send it my way. And as a more desperate alternative we thought about manually updating the prices in the database which wouldn't be too much of a problem using the standard stock system however the ASM uses multiple tables so I'm not sure which tables will need changing to make it work properly. If anyone is familiar with this process I would love to learn a bit more about it.
  10. I'm in a weird situation where I'm based in the UK but my primary market is USA because of this I'm using Dollars as my shops default currency. I've got my taxes set up but if geolocation can not detect where the user is from it defaults to "no tax" regardless of where they are. This means people see lower prices on the site then go through the checkout process and then when they put in an address it bumps up to the correct price which annoys people as the thought the price was lower. I wish to make it so that by default it adds the tax and then lowers it after checking the address. It may cause less people going through checkout but we will have happier customers because the price will go down rather than up. How would I go about setting up Prestashop to work in this way so by default it adds tax and removes it when required rather than having no tax and adding it when required whilst still maintaining geolocation functionality.
  11. After some investigating on our end we worked out what was causing this issue. Hopefully the following information will help someone out in the future. When an order gets split the first order of the two doesn't get given an invoice date. Because of this prestashop has no way of knowing where to put the sales. We resolved this by finding all the orders within the ps_orders database that had a invoice date of "0000-00-00 00:00:00" and that also has a current status of 2 or 42 (42 being payment authorised in my case). Then we replaced the invoice date for those fields with the "date_added" column.
  12. I'm experiencing a bit of an issue with my sales figures. The system I'm using is fairly bespoke so I don't expect a perfect solution but any insight will be great. For some reason a chunk of our orders aren't registering on the prestashop dashboard sales figures and the figures on the stats pages. All of the orders are made up of two order statuses, payment accepted and payment authorised. Both of which count as paid (I made sure the settings for authorised are identical to accepted). I think I may have isolated what I think has caused this problem. I've got one product on preorder at the moment and to avoid confusion with the shipping/warehouse department I've made it so if someone buys that specific product with any other products the order will be split into two separate orders. They share the same reference but not the same order id. This has been done by using the advanced stock management system on that product with a dedicated warehouse for it. We've used this functionality in the past with no major issues but this year we've introduced a new payment gateway. Rather than marking a payment as accepted this gateway marks an order as authorized and then uses a web hook system to update it to payment accepted a few minutes later. I believe the two features are interfering with each other, as the first split is being marked as accepted, whereas the other split isn't being updated and being left as authorised. I've worked out that all of the orders with this preorder product (as well as the other part of the split) add up to approximately the amount that we've got missing from our stats. I've tried updating the order status for these order but it doesn't change anything. I just wanted to know if anyone has any idea what could possibly be done to resolve this issue.
  13. Hi there, I'm currently in the process of creating some product warning messages for my site. I've managed to make one for when the product is completely sold out, one for if it's sold out but sales are still being allowed and I've got one for if everything is in stock but I'm not sure how to go about making one for if only some of the product attributes are in stock. This is what I have so far: {if $product->quantity <= 0 && !$allow_oosp} {if $product->available_later} <div class="status-box" style="border-color:#b72b39;"> <div class="status-heading" style="background-color:#b72b39;">Sold Out</div> <div class="status-desc">{$product->available_later|substr:($product->available_later|strpos:"#"+1) }</div> </div> {/if} {elseif $product->quantity <= 0} {if $product->available_later} <div class="status-box"> <div class="status-heading">{$product->available_later|substr:0:($product->available_later|strpos:"#"-1) }</div> <div class="status-desc">{$product->available_later|substr:($product->available_later|strpos:"#"+1) }</div> </div> {/if} {else} {if $product->available_now} <div class="status-box"> <div class="status-heading">{$product->available_now|substr:0:($product->available_now|strpos:"#"-1) }</div> <div class="status-desc">{$product->available_now|substr:($product->available_now|strpos:"#"+1) }</div> </div> {/if} {/if} What would be the best way to create an if statement for if some products are out of stock but not all? Also if there are any states I'm missing at the moment feel free to let me know. Thanks
  14. Hey again, I've tried adding that in but it doesn't seem to be having any effect. I can grab the attribute id for each product (The original one I was testing uses an attr id of 280) using $attr_id = $product_all[0][id_product_attribute]; or the same without the "[0]" in a foreach loop which I currently have but passing those variables over to getAttributeCombinationsById just gives me blank arrays. I also tried passing "280" directly into the method but that also didn't work so I must be missing something here. This is what I've got now. $id_lang = $this->context->language->id; $products = Product::getProducts($id_lang, 0, 5, 'id_product', 'asc'); $products_all = Product::getProductsProperties($id_lang, $products); foreach ($products_all as $product_all) { $attr_id = $product_all[id_product_attribute]; $product_attr = Product::getAttributeCombinationsById($attr_id, $id_lang); var_dump($product_attr); } Thank you for all your help with this so far. It's proving to be a lot more difficult than I first expected but it is giving me some excellent insight on how prestashop works.
  15. I stripped out the personal information and set the range to just the first product in the list. array(1) { [0]=> array(80) { ["id_product"]=> string(2) "54" ["id_supplier"]=> string(1) "2" ["id_manufacturer"]=> string(1) "0" ["id_category_default"]=> string(2) "15" ["id_shop_default"]=> string(1) "1" ["id_tax_rules_group"]=> string(2) "65" ["on_sale"]=> string(1) "0" ["online_only"]=> string(1) "0" ["ean13"]=> string(13) "5060460900017" ["upc"]=> string(0) "" ["ecotax"]=> string(8) "0.000000" ["quantity"]=> int(22) ["minimal_quantity"]=> string(1) "1" ["price"]=> float(195) ["wholesale_price"]=> string(8) "0.000000" ["unity"]=> string(0) "" ["unit_price_ratio"]=> string(8) "0.000000" ["additional_shipping_cost"]=> string(4) "0.00" ["reference"]=> string(7) "ref1" ["supplier_reference"]=> string(0) "" ["location"]=> string(0) "" ["width"]=> string(8) "0.000000" ["height"]=> string(8) "0.000000" ["depth"]=> string(8) "0.000000" ["weight"]=> string(8) "1.000000" ["out_of_stock"]=> string(1) "2" ["quantity_discount"]=> string(1) "0" ["customizable"]=> string(1) "0" ["uploadable_files"]=> string(1) "0" ["text_fields"]=> string(1) "0" ["active"]=> string(1) "1" ["redirect_type"]=> string(3) "404" ["id_product_redirected"]=> string(1) "0" ["available_for_order"]=> string(1) "1" ["available_date"]=> string(10) "0000-00-00" ["condition"]=> string(3) "new" ["show_price"]=> string(1) "1" ["indexed"]=> string(1) "1" ["visibility"]=> string(4) "both" ["cache_is_pack"]=> string(1) "0" ["cache_has_attachments"]=> string(1) "0" ["is_virtual"]=> string(1) "0" ["cache_default_attribute"]=> string(3) "280" ["date_add"]=> string(19) "2015-10-23 13:58:44" ["date_upd"]=> string(19) "2017-03-07 09:49:54" ["advanced_stock_management"]=> string(1) "0" ["pack_stock_type"]=> string(1) "3" ["id_shop"]=> string(1) "1" ["id_lang"]=> string(1) "1" ["description"]=> string(1132) "Lorem ipsem dolor set amet." ["description_short"]=> string(189) "Lorem ipsem dolor set amet." ["link_rewrite"]=> string(9) "product1" ["meta_description"]=> string(0) "" ["meta_keywords"]=> string(0) "" ["meta_title"]=> string(26) "Product Metaname" ["name"]=> string(9) "Product Name" ["available_now"]=> string(0) "" ["available_later"]=> string(27) "AVAILABILITY: ON BACK ORDER" ["manufacturer_name"]=> NULL ["supplier_name"]=> string(7) "Supplier" ["rate"]=> float(20) ["tax_name"]=> string(10) "VAT UK 20%" ["id_product_attribute"]=> string(3) "280" ["allow_oosp"]=> int(0) ["category"]=> string(12) "category" ["link"]=> string(52) "https://www.example.com/category/product.html" ["attribute_price"]=> float(0) ["price_tax_exc"]=> float(162.5) ["price_without_reduction"]=> float(195) ["reduction"]=> float(0) ["specific_prices"]=> array(19) { ["id_specific_price"]=> string(4) "3154" ["id_specific_price_rule"]=> string(1) "0" ["id_cart"]=> string(1) "0" ["id_product"]=> string(2) "54" ["id_shop"]=> string(1) "0" ["id_shop_group"]=> string(1) "0" ["id_currency"]=> string(1) "8" ["id_country"]=> string(1) "0" ["id_group"]=> string(1) "0" ["id_customer"]=> string(1) "0" ["id_product_attribute"]=> string(1) "0" ["price"]=> string(10) "162.500000" ["from_quantity"]=> string(1) "1" ["reduction"]=> string(8) "0.000000" ["reduction_tax"]=> string(1) "1" ["reduction_type"]=> string(6) "amount" ["from"]=> string(19) "0000-00-00 00:00:00" ["to"]=> string(19) "0000-00-00 00:00:00" ["score"]=> string(2) "40" } ["quantity_all_versions"]=> int(36) ["id_image"]=> string(10) "en-default" ["attachments"]=> array(0) { } ["virtual"]=> int(0) ["pack"]=> int(0) ["packItems"]=> array(0) { } ["nopackprice"]=> int(0) ["customization_required"]=> bool(false) } }
×
×
  • Create New...