StrefaBiznesu Posted October 4, 2022 Share Posted October 4, 2022 Hello. Is there a way to set presta that way. Set attributes to show default available, in stock for the client? We have try module, that auto switch default combination after default one gone to 0. But We cant use it, as it breaking external synchronizatoon. We cant mess with default combination that way. Link to comment Share on other sites More sharing options...
ps8modules Posted October 4, 2022 Share Posted October 4, 2022 Hi, override ./classes/Link.php function getProductLink 1 Link to comment Share on other sites More sharing options...
StrefaBiznesu Posted October 4, 2022 Author Share Posted October 4, 2022 2 minutes ago, 4you.software said: Hi, override ./classes/Link.php function getProductLink Can you please be more specific? I have never did any overrides. Not sure how to do it. Link to comment Share on other sites More sharing options...
ps8modules Posted October 4, 2022 Share Posted October 4, 2022 No programming knowledge? Link to comment Share on other sites More sharing options...
StrefaBiznesu Posted October 4, 2022 Author Share Posted October 4, 2022 1 hour ago, 4you.software said: No programming knowledge? Not really. No. 1 Link to comment Share on other sites More sharing options...
ps8modules Posted October 4, 2022 Share Posted October 4, 2022 (edited) Ok. The overwrite file is for Prestashop 1.7.8.x !!! Download the Link.php file. Upload: FTP the file to the ./override/classes folder ./override/classes/Link.php Administration: 1. Shop parameters => Traffic & SEO => Friendly URL "No" and save 1. Shop parameters => Traffic & SEO => Friendly URL "Yes" and save Download link: https://we.tl/t-Yf5EU1tgyX In this forum it is not possible to upload php, txt etc files to a theme, so I uploaded it outside. Edited October 4, 2022 by 4you.software (see edit history) Link to comment Share on other sites More sharing options...
StrefaBiznesu Posted October 4, 2022 Author Share Posted October 4, 2022 43 minutes ago, 4you.software said: Ok. The overwrite file is for Prestashop 1.7.8.x !!! Download the Link.php file. Upload: FTP the file to the ./override/classes folder ./override/classes/Link.php Administration: 1. Shop parameters => Traffic & SEO => Friendly URL "No" and save 1. Shop parameters => Traffic & SEO => Friendly URL "Yes" and save Download link: https://we.tl/t-Yf5EU1tgyX In this forum it is not possible to upload php, txt etc files to a theme, so I uploaded it outside. Seems We already have link.php there made by module. https://wetransfer.com/downloads/59acc029de0f2ea07f8ab7bc6ae6263f20221004182508/ed419d948fc5412a98b9f613f612c1c720221004182519/c1dd1a Link to comment Share on other sites More sharing options...
ps8modules Posted October 4, 2022 Share Posted October 4, 2022 And where is the problem? Copy the function from my Link.php and paste it into the current Link.php Link to comment Share on other sites More sharing options...
StrefaBiznesu Posted October 14, 2022 Author Share Posted October 14, 2022 On 10/4/2022 at 8:38 PM, 4you.software said: And where is the problem? Copy the function from my Link.php and paste it into the current Link.php I have copy whole code from your file to my link.php But it gets me error 500 after. Link to comment Share on other sites More sharing options...
ps8modules Posted October 14, 2022 Share Posted October 14, 2022 And how do I know if you copied it correctly without a documented code? Look here in the editor for the <> tag. This allows you to insert the content of your php file here in the forum. Link to comment Share on other sites More sharing options...
StrefaBiznesu Posted October 14, 2022 Author Share Posted October 14, 2022 (edited) https://wetransfer.com/downloads/545e89a85e2b640f53f4896ec6974daa20221014184951/af92e990592fcc41dbb0de8c693472f320221014185003/fbc39e Edited October 14, 2022 by StrefaBiznesu (see edit history) Link to comment Share on other sites More sharing options...
ps8modules Posted October 14, 2022 Share Posted October 14, 2022 No wonder it doesn't work. You should have copied only the function, not my whole file !!! Link to comment Share on other sites More sharing options...
StrefaBiznesu Posted October 14, 2022 Author Share Posted October 14, 2022 Done. But it not changing anything sadly. Still after entering the product it shows out of stock, that is set as default instead next, that is in stock. Link to comment Share on other sites More sharing options...
ps8modules Posted October 14, 2022 Share Posted October 14, 2022 So you probably haven't cleared the cache yet. I tested everything and it works. Link to comment Share on other sites More sharing options...
ps8modules Posted October 14, 2022 Share Posted October 14, 2022 If your skills are not enough, please hire an experienced programmer and he will be happy to build the code for you 😉 1 Link to comment Share on other sites More sharing options...
StrefaBiznesu Posted October 14, 2022 Author Share Posted October 14, 2022 7 minutes ago, 4you.software said: If your skills are not enough, please hire an experienced programmer and he will be happy to build the code for you 😉 Can you tell me which is your code part there please? Also can you point me how to make, that attributes automatically switch to in stock while we have two or more combinations. I.e size and color. Color blue and black Size L and S Combination blue S is in stock but black S isn't. Black is online L. While im on blue i click on size L, i want it automatically switch to color black. Link to comment Share on other sites More sharing options...
ps8modules Posted October 15, 2022 Share Posted October 15, 2022 Unfortunately, I don't understand at all. Can you make a screenshot and paint the arrows? What I did is change the url address of the default combination when it has a default combination of 0 quantity, without changing the default combination and ticking it in the administration. Link to comment Share on other sites More sharing options...
StrefaBiznesu Posted October 15, 2022 Author Share Posted October 15, 2022 10 hours ago, 4you.software said: Unfortunately, I don't understand at all. Can you make a screenshot and paint the arrows? What I did is change the url address of the default combination when it has a default combination of 0 quantity, without changing the default combination and ticking it in the administration. I mean which line have you changed. Clearing cache did not solved. Link to comment Share on other sites More sharing options...
StrefaBiznesu Posted October 17, 2022 Author Share Posted October 17, 2022 On 10/15/2022 at 4:07 AM, 4you.software said: Unfortunately, I don't understand at all. Can you make a screenshot and paint the arrows? What I did is change the url address of the default combination when it has a default combination of 0 quantity, without changing the default combination and ticking it in the administration. Which lines in code is it? Link to comment Share on other sites More sharing options...
ps8modules Posted October 17, 2022 Share Posted October 17, 2022 Compare two files online. https://app.copyleaks.com/text-compare Link to comment Share on other sites More sharing options...
StrefaBiznesu Posted November 16, 2022 Author Share Posted November 16, 2022 Code still not working. Gives me error 500 even after cache clean. Anyone have other suggestions? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now