1. Prepare the cake:
- Preheat your oven to 350°F (175°C) and grease a 9×13-inch baking pan.
- In a large mixing bowl, combine the cake mix, crushed pineapple with juice, sugar, oil, eggs, and vanilla extract. Beat until smooth and fully incorporated.
- Pour the batter into the prepared pan and bake for 30–35 minutes, or until a toothpick inserted in the center comes out clean.
2. Add the pineapple topping:
- While the cake is baking, combine the second can of crushed pineapple and 1/2 cup sugar in a small saucepan. Cook over medium heat until the sugar dissolves, about 5 minutes.
- When the cake comes out of the oven, immediately poke holes all over the surface using a fork or skewer. Pour the warm pineapple mixture evenly over the hot cake. Allow the cake to cool completely.
3. Prepare the cream cheese frosting:
- In a medium bowl, beat the cream cheese and butter together until smooth and creamy. Gradually add the powdered sugar and beat until light and fluffy. Mix in the vanilla extract.
4. Frost the cake:
- Spread the cream cheese frosting evenly over the cooled cake.
5. Garnish and serve:
- Sprinkle the top with chopped pecans or shredded coconut, if desired.
- Chill the cake in the refrigerator for at least 1 hour before serving.