Post by ryanex » Sun Jan 26, 2020 5:26 am

Hi everyone,

I'm struggling with my category pictures.
The default theme reacts perfect with the category pictures that I configure on the admin page.

But now I'm cloned the default theme , I'm losing my category pictures.
See attachments files

I follow this steps on YouTube
https://www.youtube.com/watch?v=Qb3eczmhKMI
  • copy file: admin/controller/extension/theme/default.php (copy and rename) webshop.php
    Replace the words default to webshop
  • copy file: admin/language/theme/default.php (copy and rename) webshop.php
    Replace words from default to webshop
  • admin/view/template/extension/theme/default.twig
    Replace words from default to webshop
  • catalog/view/theme/default
    Copy folder and rename it to webshop
  • /view/theme/webshop/common/header.twig
    change the css location "stylesheet.css"
  • /view/theme/webshop/image/default.png
    Rename default.png to webshop.png
  • Open admin pagine
    Extensions/extensions
    select themes
    Disable Default store theme
    Enable Webshop store theme
  • Change theme selection in website settings
NO SUCCES

next I follow the steps that I read on this forum
viewtopic.php?t=202416

Same problem
I struggling with the same issue.

Next I copy my hole folder to Linux en used this bash scripts
https://gist.github.com/tom-it/ea1d64f2 ... 0fbca2fcf9

Code: Select all

#!/bin/bash

if [ "$#" -ne 3 ] || ! [ -d "$1" ]; then
  echo "Usage: $0 THEMEDIR $1 ADMINDIR $2 COPYNAME" >&2
  exit 1
fi

#The admin controller needs a capitalized theme name
function capitalize_first(){
  string0=$COPY
  firstchar=${string0:0:1}
  string1=${string0:1}
  FirstChar=`echo "$firstchar" | tr a-z A-Z`
  CAPITALIZEDCOPY="$FirstChar$string1"
}


THEMEDIR=$1
ADMINDIR=$2
COPY=$3


capitalize_first

echo "Duplicating default theme"
cp -R $THEMEDIR"/default" $THEMEDIR"/"$COPY

echo "renaming theme image"
mv $THEMEDIR"/"$COPY"/image/default.png" $THEMEDIR"/"$COPY"/image/"$COPY".png"

echo "fix css include dir"
sed -i "s/default/${COPY}/g" $THEMEDIR"/"$COPY"/template/common/header.twig"

echo "copy admin controller and rename"
cp $ADMINDIR"/controller/extension/theme/default.php" $ADMINDIR"/controller/extension/theme/"$COPY.php
sed -i "s/default/${COPY}/g" $ADMINDIR"/controller/extension/theme/"$COPY".php"
sed -i "s/Default/${CAPITALIZEDCOPY}/g" $ADMINDIR"/controller/extension/theme/"$COPY".php"

echo "copy language file"
cp $ADMINDIR"/language/en-gb/extension/theme/default.php" $ADMINDIR"/language/en-gb/extension/theme/"$COPY".php"
sed -i "s/default/${COPY}/g" $ADMINDIR"/language/en-gb/extension/theme/"$COPY".php"
sed -i "s/Default/${CAPITALIZEDCOPY}/g" $ADMINDIR"/language/en-gb/extension/theme/"$COPY".php"


echo "copy admin view file"
cp $ADMINDIR"/view/template/extension/theme/default.twig" $ADMINDIR"/view/template/extension/theme/"$COPY".twig"
sed -i "s/default/${COPY}/g" $ADMINDIR"/view/template/extension/theme/"$COPY".twig"
Also, the same trouble.

Can somebody helps me with this ?

Attachments

2020-01-25 21_39_11.2.png

2020-01-25 21_39_11.2.png (4.78 KiB) Viewed 823 times

2020-01-25 21_37_33.1.png

2020-01-25 21_37_33.1.png (10.17 KiB) Viewed 823 times

Last edited by ryanex on Sun Feb 09, 2020 8:25 pm, edited 2 times in total.

Newbie

Posts

Joined
Mon Sep 17, 2018 12:50 am

Post by sw!tch » Sun Jan 26, 2020 11:39 am

Did you refresh your modification cache? Assuming those category images are some add-on .

Admin->Extension -> Modifications. -> Refresh Icon.
Also, Admin -> Dashboard -> Small Cog Icon on right . Refresh both..

Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by ryanex » Sun Feb 09, 2020 8:23 pm

sw!tch wrote:
Sun Jan 26, 2020 11:39 am
Did you refresh your modification cache? Assuming those category images are some add-on .

Admin->Extension -> Modifications. -> Refresh Icon.
Also, Admin -> Dashboard -> Small Cog Icon on right . Refresh both..

Hi Sw!tch,
Thx for the comment.
The refresh button was the solution in the Extension section.

Newbie

Posts

Joined
Mon Sep 17, 2018 12:50 am
Who is online

Users browsing this forum: No registered users and 44 guests