luck3rm
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Woocommerce removing parent category slugI also need help with this.
How do we stop parent slugs from showing in subcategory permalinks in WooCommerce?Hello @davidserrano72
I received a snippet of code from WP All Import support that solved the problem.“Yes, it looks like you can use a custom PHP function for this: https://www.wpallimport.com/documentation/developers/execute-php/. The idea would be to pass the name of the attribute you want along with all of the names/values, then loop through them to find the value. Here’s how you’d call the function:
[my_get_attribute_value(“SIZE”,array({Extras/Name}),array({Extras/Value}))]
And the code would be:
function my_get_attribute_value( $attr, $name, $value ) {
if ( empty( $name ) || empty( $value ) ) return;$names = explode( “, “, $name[0] );
$values = explode( “, “, $value[0] );foreach ( $names as $key => $v ) {
if ( $v == $attr && array_key_exists( $key, $values ) ) {
return $values[ $key ];
}
}
}”Forum: Plugins
In reply to: [WooCommerce] Strange ???-behaviour in category URLsHi,
I tried what you said and it now works on my site, for example https://alissa.se/kl%C3%A4der/aftonkl%C3%A4nningar/
For my purposes, I think I’ll go with ??? URLs anyway and maybe redirect non-??? to the actual URLs.
Thanks for your help!
Forum: Plugins
In reply to: [WooCommerce] Strange ???-behaviour in category URLsI’m not using any plugin for permalinks. Like I said, this way of URL-encoding works with WordPress standard posts, pages and taxonomies, and it works with the slug for the shop, but not WooCommerce product category URLs.
Forum: Plugins
In reply to: [WooCommerce] Strange ???-behaviour in category URLsHi,
I converted them to a percent encoded format. So ? becomes %C3%B6 for example. Pasting that in, I’m able to get ??? in WordPress-urls.
Hi,
Any updates on this?Hey @wpallimport
The attributes in my XML feed are structured like this:
<name>Color</name>
<value>Green</value>
<name>Size</name>
<value>Medium</value>
and so on and so fourth. Additionally, the name-value-pairs are not always in the same order (sometimes Size would come before Color) and there are different ones for different kinds of products.How can I import this?
The only way I see it could work is if I add like 10 attributes (more than the amount on the product that has the most) and drag in the Name and Value ones in the respective field. That would create new attributes for each product feed though and I’d like to be able to merge the attributes by mapping them against my own ones…What would you suggest I do?
Forum: Fixing WordPress
In reply to: WP in subdirectory: Keeping old homepageGot it to work. Just had to put this before the RewriteRules:
RewriteCond %{REQUEST_URI} !^(/)$Forum: Fixing WordPress
In reply to: WP in subdirectory: Keeping old homepageHi,
Good point, but I don’t want to have to load WordPress for my homepage. It’s a fast and coded from scratch. I only need WordPress for a specific section of my website.
Here’s my .htaccess code that rewrote the URLs including the homepage.
RewriteCond %{HTTP_HOST} ^(www.)?test.klassensval.se$
RewriteCond %{REQUEST_URI} !^/studenten/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /studenten/$1
RewriteCond %{HTTP_HOST} ^(www.)?test.klassensval.se$
RewriteRule ^(/)?$ studenten/index.php [L]Can I set up an exception for the homepage somehow?
Hi,
I don’t use WPLM or Polylang. I saved the product category by using URL-encoded values as substitutes for the ???-letters (? = %C3%A5). That method always tends to work in WordPress.
Hi,
it’s not working still.
The ??? now works at https://alissa.se/produkt-kategori/kl%c3%a4nningar/ but it keeps putting “produkt-kategori” in front. I want to remove that completely and just get https://alissa.se/kl?nningarForum: Plugins
In reply to: [Boxzilla] Close Boxzilla box upon redirectAwesome, that worked!
Thank you for the help!